yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] beefmaster:
hey i have been learing java for a while and just have started coding for android last night

i am learing android development off the new boston youtube page

i have created some buttons in xml and assigned them ids and now would like to add an on click listener.

this is my code

package com.example.time;

import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.os.Build;

public class StartingPoint extends ActionBarActivity {

Button yes,no;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_starting_point);

yes = (Button) findViewById(R.id.bno);
no = (Button) findViewById(R.id.byes);
add.setonClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub

}
});

eclipse created an onclicklistner but has an error with add

the tutorial i am learning of of is from the late 2000s is there a new way or something have i done something wrong please help

this is my first post yaaah

sorry if this isnt allowed in this section of the forum i see that people are asking question here aswell but when i go to post this threads it says that you cant post it here

any way thxs for ur help in advance
[Java for Android App Development] SimplicityApks:
It is the right way to do it, only you messed up the names. If you have two Buttons in your layout (yes and no), you set an onClickListener on one of them calling <buttonName>.setOnClickListener(...);, so in this case yes.setOnClickListener(...). Also I would suggest renaming your Buttons in the code to bYes and bNo or something like that so you know it is a Button. And yes, it is the right section :good:
[Java for Android App Development] Masrepus:
Dont you also have to declare the buttons with

Button yes = (Button)findViewById(R.id.byes);

---------------------------------

Phone : Nexus 4

OS:

Pure KitKat 4.4.2 stock, no root, no mods

---------------------------------

4d 61 73 72 65 70 75 73 20 66 74 77

Gesendet von Tapatalk
[Java for Android App Development] SimplicityApks:
If you do it this way, "yes" is only declared in the scope of the onCreate method. It is possible, but for views which sit in memory anyway it's more convenient to have the those delared as instance variables like he did above, right below the class declaration.
[Java for Android App Development] Masrepus:
oh didnt see that

---------------------------------

Phone : Nexus 4

OS:

Pure KitKat 4.4.2 stock, no root, no mods

---------------------------------

4d 61 73 72 65 70 75 73 20 66 74 77

Gesendet von Tapatalk
[Java for Android App Development] RahulRao66:
Dude I think u Have Interchanged the functions of Button yes and Button no.

yes = (Button)findViewByID(R.id.byes);

no = (Button)findViewByID(R.id.bno);

yes.setonClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {

// TODO Auto-generated method stub

}

});

no.setonClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {

// TODO Auto-generated method stub

}

});

Also Just For the sake of testing you can add a toast message as below

yes.setonClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {

// TODO Auto-generated method stub

Toast t = Toast.makeText(getApplicationContext(),"YES Pressed",Toast.LENGTH_SHORT);

t.show();

}

});

no.setonClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {

// TODO Auto-generated method stub

Toast t = Toast.makeText(getApplicationContext(),"NO Pressed",Toast.LENGTH_SHORT);

t.show();

}

});

Also Check the activity_starting_point.xml file if you have messed with the Button IDs.'

Hit Thanks If I have Helped you ......
[Java for Android App Development] surlac:
You don't have to cast to Button class in this particular case, View has already defined method "setOnClickListener".

And yes, you better declare field to keep reference and avoid additional findViewById() calls.
[Xolo Q700, Q700i] thecoolster:
hey guys

so i worked on my rom for some days now and want to test it ...... as my phone has been taken away(too much texting(:SAD￼}

i cant test it!!!

so i need someone to test it for me ....

i will not be responsible for bricked devices or dead sdcard..........

pls thank me if the rom worked and if it didnot ...then i will take a look and when answering about the bug be more specific

i will be changing the boot animations and stuff but i just want to see if it works.....

here is the link for download.........Removed by VECTUS

special thanks to :

mr X [if rom works thank him too]{if it doesnot check his rom￼}

pls test it guys...thanks

Pls help

:banghead:
[Xolo Q700, Q700i] VECTUS:
Thread closed... Developer is no longer supporting it.
[Galaxy S 5 Q&A, Help & Troubleshooting] btort1:
Do you guys know how to switch the hard keys? I really don't like how the location of the back key is on the right side, how do i customize this?
[Galaxy S 5 Q&A, Help & Troubleshooting] Goldie:
Install my rom and you can choose what function is on which button :p
[LG Optimus 4X HD] adanos6:
Help i ve been having this problem for quite some time now .

Internal Storage: Total space 12.26gb

Apps 113mb

pictures,videos 26.98mb

Audio 20kb

Downloads 1.17mb

Misc 16kb

AVAILABLE 2.47GB <---

Can anyone explain how to fix this ?

I did a Factory data reset , but still have the same issue. :eek: :eek:
[LG Optimus 4X HD] dimi89:
Backup your data and format system.This could happened if you moved from 4.1 ROM to 4.x since different folders are used for storage.Also all this is already explained on forum many times.

Послато са LG-P880 уз помоћ Тапатока
[Verizon Samsung Galaxy S 4] decaturbob:
I may try this on my wife's stock s4 as long as no one tells her.

sent by bajarom v2.2 kitkat
[Verizon Samsung Galaxy S 4] Jraider44:
I did this at 1 o'clock today when he release it. Works great! However be sure to download the latest SuperSU here:

http://download.chainfire.eu/447/SuperSU/UPDATE-SuperSU-v1.99r4.zip

The one in the play store refused to update binaries for some reason.

After you download, open/extract the Zip file. In it is a folder called 'common'. In that folder you will find the updated apk. Just install that and you are good to go!
[Verizon Samsung Galaxy S 4] esheesle:
So if I'm on rooted MK2 (stock, no special recovery or anything, just rooted) should I just unfreeze the updater, full unroot in supersu, get the ota, then run this?

Just curious if anyone currently on stock/rooted mk2 has ota'd up without having to factory reset and lose all their data or not.
[Verizon Samsung Galaxy S 4] Jraider44:
If you update OTA, you shouldn't have to factory reset. Worse comes to worse, I use the no-wipe files in Odin to clean everything out and maintain data.

Do exactly as you said above... Unfreeze updater, unroot, make sure all stock files are there though. Meaning if you uninstalled a system app (VZW stuff for example) reinstall it. Then take the update OTA. Once there , install towel root and push button and whala! Root on 4.4.2!

If you run into trouble updating (if it won't OTA for some reason). Use the no-wipe file found here

http://xdaforums.com/showthread.php?t=2578209

This will protect your data, and do everything stated above in one instance. If you need help with this, just google how to use Odin and read that thread. (File goes in PDA/AP slot. Click start)

Forgot to mention, after you Odin, you take the OTA, and proceed.

Those are MK2 files....
[Verizon Samsung Galaxy S 4] Sir_Eagle:
Just used this method myself, works great, easiest and quickest root I have ever done.
[Verizon Samsung Galaxy S 4] vzwnexus:
this doesn't trip the know counter right? also, does this mean we can install SS and install custom roms now? sorry if it's dumb question.
[Verizon Samsung Galaxy S 4] Sir_Eagle:
Knox is still 0x0

You could install SS before with the downgrade/upgrade root methods. I did not re-install SS recover but you should be able to use the ATT version just like with the downgrade/upgrade methods
[Verizon Samsung Galaxy S 4] will4958:
I want to try this, but first I must ask will the mobile hotspot hack that was put out for Jelly Bean work for this also, or is there something similar?
[Verizon Samsung Galaxy S 4] JewRican:
just rooted mine as well.

Since having to get a warranty replacement and losing the ability to flash stock roms, i have not had the need for root, but why not? lol
[Verizon Samsung Galaxy S 4] Jraider44:
I'm unsure if tethering will work on the NC5 build... Will look into it though
[Verizon Samsung Galaxy S 4] Nicklag:
I did this and tried to install safestrap and all it did was reboot. Don't know what I left out.
[Verizon Samsung Galaxy S 4] Sir_Eagle:
Did you open the app and tell it to install recovery?
[Verizon Samsung Galaxy S 4] Nicklag:
Yes
[Verizon Samsung Galaxy S 4] djsbad:
Having the same issues myself. I have no clue in how to install safestrap at all after using towelroot. Got my rom ready to flash but cant get a recovery going to be able to do so.
[Verizon Samsung Galaxy S 4] Sir_Eagle:
What version of SS? Did you try the 3.72 for ATT?
[Verizon Samsung Galaxy S 4] timmyd463229:
I rooted my wife's s4 with towelroot then tried to install SuperSU but when it tries to update binaries it says this device has Knox would you like to try to disable Knox continue or cancel if I hit cancel it just doesn't install but I haven't hit continue because I don't know what will happen
[Verizon Samsung Galaxy S 4] muniz_ri:
It will turn off the knox notification, there is no harm in doing so.

---------- Post added at 08:58 PM ---------- Previous post was at 08:56 PM ----------

You need to run Selinux mode Changer and change mode to permissive to allow the safestrap apk to work after upgrading to NC5 using the OTA: https://play.google.com/store/apps/details?id=com.mrbimc.selinux&hl=en
[Verizon Samsung Galaxy S 4] vzwnexus:
I was scared to disable mine but I ended up doing it anyway. It froze up the first time but I restarted my phone and went back to update the binaries. The second time worked. My know counter in ODIN mode still shows 0x0.
[Verizon Samsung Galaxy S 4] timmyd463229:
OK cool I'm doing it now thanks

---------- Post added at 05:04 AM ---------- Previous post was at 05:03 AM ----------

Should I try to install safestrap before I install xposed
[Verizon Samsung Galaxy S 4] thekidkid32:
Ok so I went to update the app and it wouldn't work, kept saying app not installed. So I uninstalled SuperSU that I got from the Play Store and installed this version. This one seems to work better, it's changing permissions to permissive on boot instead of having to enable it everytime, but it never gave me the option to update binaries, and I don't see anything in the settings that would allow me to update binaries. I also see the Play store says the app needs an update.

I updated back to the Store version and everything looks okay, just not asking about binaries, I'm assuming I'm good to go now?

Edit: Got everything working now, looking forward to trying out some great Roms.
[Verizon Samsung Galaxy S 4] bstark2000:
I posted this in a different thread. Maybe this one is a more appropriate.

I have a Verizon Galaxy S4 Android 4.2.2, build 15454VRUAME7. I'm looking at rooting with TR and installing SU and TI Backup in order to remove bloatware and possibly extend capabilities with Xposed framework. Ideally, I would like to upgrade to 4.2.2, then root with TR. I have a few questions:

If I root now, can I use Safestrap? I hear its not supported for Verizon phones and may not be unstable with the 4.4.2 bootloader, if it even works at all.

I've had the OTA update message to go to KitKat 4.4.2 for over a month now. If I took the OTA, does a new version, with the latest bootloader get downloaded, or has the update files already been downloaded on my phone and they just get installed? If I take the latest version with the updated bootloader, I understand TR won't root my phone. If the OTA files are already on my phone and just need to be installed, the chances are good I still have a pre June 3rd bootloader and TR will root my 4.4.2 phone.

Should I disable or uninstall my firewall and anti-virus apps before rooting?

I have lots of things to consider; I need to do this right the first time.

Thanks in advance for your help.

Bob
[Verizon Samsung Galaxy S 4] npjohnson:
First, Read the OP (first post in this thread) it answers most of your questions!!!

Second. If you want Kitkat roms OTA to 4.4.2 (Nc5) and you will be completely up to date and can root via towelroot. Safestrap works fine. It is made for the att version, but works fine on our phone for flashing roms, you just can't dual boot multiple roms. Eclipse is a great Google themed rom, and my daily runner. (Explained in the op)

About your June 3rd comment... The bootloader version doesn't matter, it's the kernel and the OTA (Nc5) kernel is dated well before then. So until 4.4.3 comes out towelroot will work. Towelroot will root ANY (very few exceptions..)

4.4.2 phone. So just take the OTA! And root via towelroot use permission changer from the play store to set SE LINUX to permissive and install att safestrap 3.72 (ALL OF THIS IS IN THE OP)

Antivirus and firewall. Always a good safety precaution to disable it. (Will add this to OP)

Everyone, please read the OP! It contains the answers to most of your questions!
[Verizon Samsung Galaxy S 4] wwonka69:
Ok I did read the op and I can get my nc5 rooted and I changed the permisions and ss installs but when i reboot SS isn't there. just boots normally without the option to enter SS.

any thoughts?

Peace
[Verizon Samsung Galaxy S 4] npjohnson:
Try rebooting, re changing permissions and reinstalling.

Also make sure Super SU is updated to 2.0 or 2 0.1
[Verizon Samsung Galaxy S 4] wwonka69:
I tried all that and I ended up just using giglies method of down and then up and now I'm on hd17 .

For some reason with nc5 it didn't want to let ss stick.

Peace

Sent from my Galaxy S4.
[Verizon Samsung Galaxy S 4] Audemars02:
Ok, silly question here... Right now, I am on 4.3 MJ7 rooted, and want to upgrade to 4.4 NC5 and then re-root via Towel Root. I don't care about flashing ROMs, just want root access...

In the past, I would normally ODIN a no-wipe of the current verison I was running and then take the OTA and re-root. But, I can't seem to find a no-wipe of MJ7 out there (the link for the no-wipe MJ7 at http://xdaforums.com/showthread.php?t=2507217 is broken). So, does it matter if I ODIN to MK2 and take the OTA to 4.4 NC5, or just ODIN directly to 4.4 NC5 and then root via towelrool? Or is there a better method I should follow

Although I have had my Verzion S4 for a year now and have done this a few times, still feel like a total noob at this (i miss webOS's "developer mode" that make this whole process so easy!)

Thanks for any help

Adam
[Verizon Samsung Galaxy S 4] Leo G:
Won't 4.4 be beyond the cut off date for the towelroot to work?
[Verizon Samsung Galaxy S 4] npjohnson:
For what you said you want... I would use Titanium Backup to backup your user data. Then Flash the New full wipe tar. Although you can use the no wipe tar, it is always better to full wipe when upgrading.
[Verizon Samsung Galaxy S 4] Audemars02:
I use (and love) Titanium Pro, but i really do not want to go thru the hassle of a full wipe... its just a pain...
[Verizon Samsung Galaxy S 4] k1mu:
Flash the no-wipe MK2, then. I'd just flash the no-wipe NC5 after taking a backup.
[Verizon Samsung Galaxy S 4] bryannn29:
Wow, this is the easiest root method ever! Thanks, it worked perfectly.
[Verizon Samsung Galaxy S 4] Avocet:
Towelroot worked nicely for me BUT... Every 3 or 4 days, Verizon's protection software reports "FILES HAVE BEEN CHANGED ON THIS DEVICE." The phones status then shows CUSTOM. A restart will show the custom samsung message with the unlocked padlock. The restart does change the phones status back to OFFICIAL. Another reboot brings up the proper Samsung Galaxy S4 screen. Anyone else experiencing this? I'm still assuming my Knox counter has not been tripped ... :confused:
[Verizon Samsung Galaxy S 4] Audemars02:
I remember having this same problem back on 4.3.... I just opened up Titanium backup, searched for Verizon Support &Protection and "froze" it. problem solved! it never bothered me again!
[Verizon Samsung Galaxy S 4] smoint:
SCH-i605 problems!!!

I have GNote2 (sch-i605 verizon) with unfortunately new 4.4.2, towelroot fails, and i cant stand not being able to use my sd card any ideas???
[Verizon Samsung Galaxy S 4] Audemars02:
Finally got around to upgrade and root on NC5 and just wanted to give my experience...

BACKGROUND: I had a Verizon S4, on 4.3 MJ7, rooted

1) I decided that I was going to flash a no-wipe 4.3 MK2 and then try to OTA to NC5

2) I flashed the MK2, but I had previously "frozen" the SDM app using Titanium to prevent the phone from taking the OTAs in the past. Unfortunately, this app was still frozen after the MK2 flash, and since I wasn't rooted, there was no way to unfreeze it... So no way to OTA to NC5!

3) I then flashed the NC5 no-wipe to bring me to 4.4.2. Flash went on without a hitch!

4) I then downloaded Towelrool and installed it... a few comments about that:

The install took a really really long time. Like 10 minutes or so!

I got both a Google and a Avast Security pop-up saying this was a virus/malware

Once I added this to the "ignore" list, it went fine

5) After running Towelroot (and having to tell Avast to allow it, again), it said it was successful

6) However, running rootchecker, SuperSU, Titanium, etc., it wasnt actually rooted. This really worried me for about 10 minutes, when all of a sudden I got the "do you want to grant access" pop-up for all those apps. I granted access, and I was actually rooted!! crisis averted!

So, I have NC5 running on my device, can access Chromecast Cast Screen, "Ok Google" from anywhere, etc. But I must say that my phone seems to be so much slower or laggy than it was on MJ7. Anyone else see this? or is it just me?

thanks again for everyones help on this... now I need to go donate to give my thanks for towelroot!
[Verizon Samsung Galaxy S 4] scootincivic:
I'm on the plunge to do the exact same as you.

With your 10min wait however double check & make sure SuperSU is in fact in system & not just in SD or extSD as this may be an issue later down the line.

~Civic
[Verizon Samsung Galaxy S 4] npjohnson:
Towelroot is made for 4.4... research before questioning :p it works through 4.4.4
[Verizon Samsung Galaxy S 4] calemus:
root

so the

1) towelroot

2) http://androidcentral.us/2014/01/how-to-disable-uninstall-knox-on-your-samsung-galaxy-devices/

3) http://www.mgyun.com/vroot

do not work for getting root on kitkat for the vzw i545

i am astounded that the vroot does not work

this is a first, i have always been able to trust them before

anyone figure out how to make a root, pleas post
[Verizon Samsung Galaxy S 4] decaturbob:
towel root works on andriod 4.4
[Verizon Samsung Galaxy S 4] calemus:
i have 4.4.2

tw is not working

but, i already said that?
[Verizon Samsung Galaxy S 4] decaturbob:
Towel root does work, thousands of people have used it successfully to root their Verizon s4 on nc5...you did something wrong. ..make sure you have a good download and report what happened when you tried to install towel root. You just can't say it doesn't work when we all know it does.

sent by safestrap powered echo v26
[Verizon Samsung Galaxy S 4] calemus:
i can say it does not work

because it did not work

if you wanted to be helpful and assist in trouble shooting you could ask for a video

that would be useful

a bad attitude and acting like a jerk is not useful

when i click the "make it rain" button the cycle goes through the 15 second loop, phone reboot, and absolutely nothing has happened to root or SU access

edit : the video posted is not working, but it is simply an illustration of what i explained. event, fail, repeat

can not deal with the video now, got to go
[Verizon Samsung Galaxy S 4] decaturbob:
Correction..doesn't work for you. What version of towel root do you have and what is your build number.

sent by safestrap powered echo v26

---------- Post added at 08:07 AM ---------- Previous post was at 07:21 AM ----------

I take it you are on NC5 basebuild. Did you do OTA to get to that and have you taken any security updates since moving to NC5?
[Verizon Samsung Galaxy S 4] calemus:
move to kitkat was done over ODIN

no updates the system since install
[Verizon Samsung Galaxy S 4] tshelby73:
Did you install super su from play store?
[Verizon Samsung Galaxy S 4] calemus:
yes super su says i have no root after the towel reboot

every time
[Verizon Samsung Galaxy S 4] nick.koutrelakos:
Towel shouldn't automatically reboot your phone so... Just try to download it again or find a slightly older version.
[Verizon Samsung Galaxy S 4] Nergal di Cuthah:
What is the date on your kernel? Please type or submit an image of your "about screen"'s baseband version.

Did you get towel from towelroot.com or a mirror?

What is the error just before reboot?

In security settings is verify apps checked or unchecked
[Verizon Samsung Galaxy S 4] calemus:
whene i go to "towelroot.com" and click on the symbol it loads a page of this stuff

�g���	�t�o�w�e�l�r�o�o�t���H�C�l�i�c�k� �t�h�e� �b�u�t�t�o�n� �t�o� �i�n�s�t�a�l�l� �r�o�o�t�

�I�f� �y�o�u�r� �p�h�o�n�e� �r�e�b�o�o�t�s�,� �t�o�w�e�l�r�o�o�t� �f�a�i�l�e�d����\�����c�o�m�.�g�e�o�h�o�t�.�t�o�w�e�l�r�o�o�t�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

i do not get an option to download

i got the downlaod i did get from some tutorial that linked a bunch of android stuff[/QUOTE]

i do not get an option to download

i got the downlaod i did get from some tutorial that linked a bunch of android stuff
[Verizon Samsung Galaxy S 4] Nergal di Cuthah:
Right click the symbol and download the link
[Verizon Samsung Galaxy S 4] Leo G:
Use a different browser to access the site.
[Verizon Samsung Galaxy S 4] calemus:
installed towlroot fresh from the website

device nolonger rebooting after "make it rain" button

nobloat, and other root programs are telling me i still have no root
[Verizon Samsung Galaxy S 4] calemus:
as towlroot does not work for me is there any way else for me to root a 4.4.2 kitkat?
[Verizon Samsung Galaxy S 4] decaturbob:
Have you tried flashing a clean nc5 odin image before trying towel root?...

sent by safestrap powered echo v26

---------- Post added at 12:21 PM ---------- Previous post was at 12:01 PM ----------

No other native root for kitkat except towel root.

sent by safestrap powered echo v26
[Verizon Samsung Galaxy S 4] calemus:
"Have you tried flashing a clean nc5 odin image before trying towel root?...

sent by safestrap powered echo v26"

yes, this is how i upgraded my phone
[Verizon Samsung Galaxy S 4] joshm.1219:
Looks like your stuck without root then. Sorry man you're the first report towel root not working in nc5.
[Verizon Samsung Galaxy S 4] jcazes:
FYI -- if anyone tries this and are UNABLE to click the install button when opening up the towel root apk, disable any apps you're running that cover the entire screen (like Easy Eyes). There must be some sort of security feature that disables clicking the install button when a system-wide mask is enabled!

Took me a while to figure it out! :p
[Verizon Samsung Galaxy S 4] whikky:
I just hit on this issue as well. I had root on my GS4, soft bricked it on accident. After I used Odin to get stock back I was unable to re-root using Towelroot. Any ideas?

Update: Running SuperSu fixed my issue.