yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] nikwen:
The problem is that the run() method needs to be a method of the Thread. Use this:

Thread t = new Thread() {

public void run() {
// TODO Auto-generated method stub
try {
t.sleep(5000);
d.dismiss();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
};

However, this WILL NOT work due to the fact that you can just change the UI from the UI Thread.

So change it to this:

package com.example.dolaog;

import android.location.GpsStatus.Listener;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.Toast;
[COLOR="Red"]import android.os.Handler;[/COLOR]

public class MainActivity extends Activity implements OnClickListener, Runnable {
Button b, b2;
View a;
ProgressDialog d;
[COLOR="Red"]Handler handler;

Thread t = new Thread() {

public void run() {
// TODO Auto-generated method stub
try {
sleep(5000);
handler.post(new Runnable() {
public void run() {
d.dismiss();
}
};
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
};[/COLOR]

[MENTION=439709]override[/MENTION]
protected void onCreate(Bundle savedInstanceState) {
[COLOR="Red"] handler = new Handler();[/COLOR]
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b = (Button) findViewById(R.id.button1);
b2 = (Button) findViewById(R.id.button2);
b.setOnClickListener(this);
b2.setOnClickListener(this);
}

[MENTION=439709]override[/MENTION]
public void onClick(View arg0) {
switch (arg0.getId()) {
case R.id.button1:
showDialog(0);
break;
case R.id.button2:
d = ProgressDialog.show(this, "Initialising", " Please wait...", true);

t.start();

break;
}
}

[MENTION=439709]override[/MENTION]
protected Dialog onCreateDialog(int g) {

switch (g) {
case 0:
Builder b = new AlertDialog.Builder(this);
b.setIcon(R.drawable.ic_launcher);
b.setTitle("From Crazyandroidgalaxy, please hit me !!");

b.setPositiveButton("asd", new DialogInterface.OnClickListener() {

[MENTION=439709]override[/MENTION]
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
Toast.makeText(getBaseContext(),
"I am Tanmay aka Crazyandroidgalaxy admin!",
Toast.LENGTH_LONG).show();
}
});
return b.create();
}
return null;

}

}

That should work.
[Java for Android App Development] hiphop12ism:
Thank you so much!
[Java for Android App Development] hiphop12ism:
But can you, explain me the code modification. I am unfamiliar with the Handler class and post method...

Thanks :laugh:
[Java for Android App Development] nikwen:
Yeah, the UI is created in one thread. That is what is called the "UI thread". The UI can just be modified from that UI thread.

If you want to modify the UI from another thread, you use handlers. If you pass a Runnable object to their run() method, that runnable will be executed in the UI thread. So you can modify the UI from that thread.

Better code would be using an AsyncTask. Basically, it is a wrapper class for Thread and Handler. (Additionally, there are some performance enhancement due to a thread pool.)
[Java for Android App Development] hiphop12ism:
Thank you so much.

But, the problem is... Whenever the 2nd button (b2) is clicked for the second time..

The app force closes..
[Java for Android App Development] nikwen:
That happens because the thread has already been started.

Check whether it is running and if it is not, start it. If it is, do nothing.

Use the isAlive() method for that.
[Java for Android App Development] hiphop12ism:
Gotcha... Thanks!!
[Verizon Samsung Galaxy S 4] zregnier:
Whenever I do an image search in Google Now the thumbnails load but when I tap an image it won't load the higher res version. Anyone else have this issue and know a fix?
[Verizon Samsung Galaxy S 4] robertlee993:
image issue

DID you saved your images properly,these issue often comes when images are not saved properly, I will suggest you should use Picassa for Pictures,
[Verizon Samsung Galaxy S 4] DarkMenace:
Google+ can be set to upload the images automatically. I don't think Picassa supports that. However Google owns Picassa so maybe the pictures Google Plus uploads go to Picassa . Since Picassa is also the same thing as Google+ he would be better off using the Google+. Picassa uploads directly to Google+ so no use in having 2 doing the same thing. You get 15GB storage with Google+ BTW with the new upgrades they did. I was legacy and bought 25GB for $2.49 a month and now they gave me a free 25GB so I now have 50GB total for pictures in HiRes.
[Verizon Samsung Galaxy S 4] zregnier:
I'm talking about when I do a Web search for images. When I tap a pic to view it enlarges the thumbnail but won't load the higher res version. Seems to be a Google search/now issue because if I try this in Dolphin browser it's fine.
[Samsung Galaxy Tab Plus] Grumbles:
Hello everyone,

Ive spend the last hour or so trying to find a basic step by step for me here, but so far nothing I can understand- Please pardon my ignorance...

Ok-

I have a fully STOCK galaxy tab 2 7.0 Plus:

-GT-P6210 (US model)

-4.0.4

-Kernel: 3.0.15

-Build: IMM76D.UELPC

I would like to get 4.1-4.2 running on here, but ideally- 4.1/2 running a stock(nexus like) ROM. I am def. not a fan of Samsungs interface as time has gone by, but seem to favor the nexus's (unless there is better?) . I know I need to root the device, and I am fine with that, along with all the risks that go with this (I killed a atrix a few years ago).

So, if someone could direct me to the proper link(s), or if your willing to help me a little (we can work something out PP/BTC) Id greatly appreciate it!

I have the ability, just have 0 teacher to show me the way. From what I understand some of the ROMs available here are great, and id really like to learn. I am a hardware guy for a living, swimming in this world of software is daunting at times...
[Samsung Galaxy Tab Plus] DigitalMD:
There is no such thing as a Google / Nexus style ROM for this device. there are variants of CM 10 but that is custom CM, not Nexus UI.

In fact there is no such thing as a pure Google version of Android for any device. Google does not supply the kernel and device drivers so Google Android from Google source runs on none, nada, zero, devices out of the box. Each hardware vendor takes the base Android and adds their own parts to the kernel, adds device drivers and in Samsungs case some additional UI and frame work features (Touchwiz).

The CM 10 JB variants work ok, but some hardware features like the IR blaster will not work on those since the HW is Samsung specific. A better experience if you don;t like the TW launcher might be to install the stock Samsung JB 4.1.2 ROM and then install one of the nice third party launchers on the market to get a different UI look. The launcher is really the major visible difference between Nexus UI and Samsung. Apex, Nova, and Holo are 3 launchers that work well.
[Samsung Galaxy Tab Plus] Grumbles:
Hello, and thank you for you reply!

That makes sense, regarding the Nexus/android ROM- again, please pardon my ignorance...

As for the IR blaster, i am not too concerned about loosing that function. I never really use it, and its never worked great anyway...

Id like to try a stock samsung 4.1/4.2 ROM, and try a 3rd party launcher, or even give the CM10 a go if the stock rom doesnt work. It is my understanding I will have to root the device before I can proceed anywhere. Is this a hard to do process, or pretty simple now a day (I would imagine)?

I again thank you for your help!
[Samsung Galaxy Tab Plus] DigitalMD:
You can install JB without rooting , right over ICS. Using ODIN.

If you want to customize, Rooting is the starting point. Root and install a recovery module , CWMR or TWRP. Haven't had to install root in a few months, I'll have to look at the current threads to give you a recommendation on that.

One caution,install JB or install the custom recovery and root before you wipe anything on the ICS ROM . Samsung had a bug in the system wipe routine that can cause permanent damage to the memory. It is fixed in JB ROMs and also in the custom recovery software. Just be sure not to do a factory reset on ICS.

Here is a link to the Samsung JB 4.1.2 for P6210. Using ODIN you install this over your current Samsung ICS ROM. (NOTE: the only 4.1.2 P6210 Samsung release so far is a UK ROM and some people have reported Wifi issues due to this, but I run this one and have encountered no issues at all. )

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

This appears to be the latest instruction for rooting JB.

http://xdaforums.com/showpost.php?p=41800762&postcount=216

Once you perform the above, you can return to stock Samsung ICS later if you want, but that would most likely return you to factory stock and wipe your programs and settings, so be sure you know the consequences before you jump.
[Samsung Galaxy Tab Plus] Grumbles:
Thank you, I will wait for your reply!

and thats huge on the reset, no joke- i was thinking of doing that before I start the root process!

Thank you much! I greatly appreciate it.
[Samsung Galaxy Tab Plus] DigitalMD:
See my updated reply above.
[Samsung Galaxy Tab Plus] Grumbles:
Hello,

Thank you for all your help,

I am def. going to take the JB over ICS route, that would be fine by me!

ive downloaded Odin3, and in process of downloading the JB ROM, so yay! hopefully all will go smooth! I will keep you posted if I fry it, fail, or succeed!

Thanks again.
[Samsung Galaxy Tab Plus] Grumbles:
I have one final question for you, or anyone out there running this same JB/ODIN process...

Will this, and if so how much, bog the performance of the tab itself? I notice that the tab even with ICS tends to be a little "jerky" going from menu to menu, etc... Is this because of my hardware, or lack of the "project butter" being part of the OS? (I think that was part of JB?)

If I were to have the wifi issues, would I be able to flash back?

Other than that, i am ready to hit the "Go" button!
[Samsung Galaxy Tab Plus] DigitalMD:
Why would this bog down the tablet?. JB is much smoother than ICS. That was one of Goggles goals in JB. However, some people expect PS4 like performance ..... ha...., all of these phones/tablets use cheap / low power processors. You get what you get, That being said, I am very happy with my P6210 on JB

You can always use ODIN to go back, but you will lose all your settings and installed apps when you do that.

The Wifi issues I have seen reported seem to be that some US Wifi channels do not show up. Not surprising, there are differences in the UK spectrum.
[Samsung Galaxy Tab Plus] Grumbles:
More just a thought about the S/W being much newer than the hardware. I most certainly do not expect superformance out the device, but more or less was making sure the hardware is up to the task. Would you rec. I do a backup of the system past the basic "app back n restore" app?
[Samsung Galaxy Tab Plus] DigitalMD:
When you install the JB over the Samsung ICS, your settings and apps should be retained. For all brands and ROM, You can backup and restore apps with something like Titanium Backup if you are rooted, but you should not restore data between ICS and JB using most backup apps. the storage areas are different and doing so will cause bad things to happen.
[Samsung Galaxy Tab Plus] Grumbles:
Done n Done with success!

As you stated, everything held perfect and no issues on the wifi side of things. This OS really made a good difference on the tab as a whole, feels more complete.

I thank you again for all your help!!!!!!!!

What would be a reason to "root" this tablet other than being able to run custom ROMs and maybe be able to off load some bloatware? I feel like I am missing out on what is possible with android and really should get on the bandwagon.
[Samsung Galaxy Tab Plus] DigitalMD:
For this tablet I don't feel that any of the current custom ROMs offer any advantages or features over the stock setup. I keep it rooted in case I want to drop in a custom startup screen or backup things. Other than that, there is really no good reason to root for the tablet.

Hopefully some of the developers will update to JB and add some of the Note 2 or S4 features soon though.
[Samsung Galaxy Tab Plus] Grumbles:
I hear ya there,

What a big difference this has made! thank you!!!
[Samsung Galaxy Tab Plus] DigitalMD:
Welcome of course.

Keep paddling, we are all in this together
[HTC Droid DNA] djeleet:
So I've flashed my fair share of roms mostly being sense 5 but then I tried Pac and moved then to viper. Love viper and have decided I'm gonna stick with it for awhile but suddenly the other day the photo enhancer stopped working. I belive it stopped working after I was cleaning up some stuff in the /0 folder that the Pac Rom had created. Did I delete something that is needed for the photo enhancer needs to run and how do I get it back? I dirty flashed viper back over and that didn't fix it. I also wiped caches, data, and system then did a fresh viper install and that didn't fix it. I still have the nandroid from before I started flashing anything. Could I wipe my internal and move the nandroid back and restore? I am so lost and have heard this has happened to other people. Please help.
[HTC Droid DNA] rsims26:
I restored my stock nandroid that I kept around and the photo enhancer still did not work. However, I did not wipe the internal, but very skeptical that would work. If you give it a try let us know if it worked or not.
[HTC Droid DNA] djeleet:
I haven't had the time to do this and still have to do some research. I don't know what will happen, when I wipe internal, as to how I'll get my nand back on the phone. But in the meantime I found this thread that offers another gallery and camera. The gallery has very similar photo enhancing options so it makes me happy and I don't prefer the camera it comes with so I just stock camera to take pictures and the new gallery to edit. Works for now.

http://xdaforums.com/showthread.php?p=43007668
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ReplicantDroid:
Can anyone confirm "Encrypt phone" is working under CM 10.1.0 (June 24 stable)?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] jayRokk:
http://xdaforums.com/showthread.php?p=39115583
[Micromax A110] ajrock12:
Hey guys i am using microfire v3.1 and able to mod the status bar but now facing difficultty on removing toggle button background

I want to remove the image or make it 100% transparent which is behind the toggle buttons

Here is the pic add

Can Anyone help on this
[Micromax A110] SuperDroid-BOND:
Ok brother,

Go to systemUI /res/drawable

Find image with name toolbar btn bg nor.9.png.

Edit it to whatever you want.

"Hitting Thanks Don't Cost You Anything, so, Why Don't You Try Hitting It Once.":):);)
[Micromax A110] ajrock12:
Hey Bro Thanks a lot can't believe i miss this file while messing around with the .xmls

thanks +1
[HTC Desire X] MrBrightside:
Is there any possibility to return back to stock with a VODAP120 cid?

I haven't found any RUUs :/

And no... I don't have a Backup of my Stock ROM...

Thanks in advance
[HTC Desire X] ckpv5:
There is a nand backup for VODAP120 .. check : http://xdaforums.com/showthread.php?t=2210619
[Galaxy Y GT-S5360 and Duos 6102 Q&A, Help & Troubl] TheRoHit18:
Hi Guys can any 1 give me the latest DDMD1 Kernel plzz
[Galaxy Y GT-S5360 and Duos 6102 Q&A, Help & Troubl] TheRoHit18:
plzzzz Help me Guyz.
[Captivate Q&A, Help & Troubleshooting] eternitys:
Got friend's phone caught up somewhere in between while the phone was working fine.

Running on Remics-JB and it restarted at once.

So thought to go back to recovery using the one click recovery uckf1 with bootloaders.

The flash was successful, however when it got reboot it said, "E: error in cache/recovery/sec_csc.zip"

Can anyone help me on this please.

View attachment 2086498
[Captivate Q&A, Help & Troubleshooting] 4-2ndtwin:
U could try Wipe data/factory reset in the Stock Recovery then Reboot, if ya got ur stuff backed up already or if it doesn't matter at this point.

If that doesn't fix it then use the Stock KK4 One Click without bootloaders...Odin or Heimdall, whichever u r comfortable with, found here...http://xdaforums.com/showpost.php?p=18370912&postcount=3
[Captivate Q&A, Help & Troubleshooting] eternitys:
Did not work. :(

Now the phone shows new screen. :rolleyes:

View attachment 2099095
[Captivate Q&A, Help & Troubleshooting] 4-2ndtwin:
That screen just means that ur flash to stock was not successful. And that screen works just like a Download Mode screen. See this thread for info on Captivate - PC Connection Issues...http://xdaforums.com/showpost.php?p=33227541&postcount=1

Try a different micro usb/usb cable and see if that will make the Odin or Heimdall flash to Stock KK4 successful.
[MDA III, XDA III, PDA2k, 9090 Software Upgrading] tazdevil69:
How I can copy my pda2k rom on my sd?

Thanks
[Galaxy Y GT-S5360 General] LetJect:
Hello friends,

First of all temple run is not for our device....(as it is made for armv7 processor)

So u have to use temple run ported for armv6 ..

To download it just google it....

Now here is what i found about it:

Download and indtall temple run...

Download and install chainfire 3D and their plugins...

Open chainfire 3D and go to default openGL settings>>

Then reduce texture quality and size.use plugin qualcome.

And open temple run...

This is only to just play temple run with much lag...

Now how to play temple run smoothly???

Just collect many coins and purchase wing...(do not purchase golden wing)....

Then start playing...

After few meters running,tap on pause...

Then resume...the game..

And double tap the screen..

You will get your purchased wing...

Now again after running some meters...take pause and resume game...

You will find that you can play game much smoothly...

And while jumping..

You will find that you can jump with some height....that original..

Now after auto death...

U will get obe more life

As soon as the blue power gone,

Again take pause and resume..

You will found that...

You can much smoothly and without auto death bug...

(some time still auto death bug is their but most time it is not)

.....

Just do it and play temple run...

Enjoyyyyy...!!

And dont forgot to press thanks..

Sent from my GT-S5360
[Galaxy Y GT-S5360 General] vlc07:
Better to play panda run than this.....game
[Transformer TF300T Q&A, Help & Troubleshooting] brewmeister:
hi folks, first post here.

been watching this forum for a long time and have received alot of great info.

thanks to devs and other knowledgeable folks in here.

anyways, i was on 4.2.2 bootloader and clean rom but wanted to install xubuntu.

so i downgraded to 4.1 jb and installed cromi 3.4.6, no problems except that the only kernels that work are unters. surdu's stock from kernel installer doesn't work at all?? anyhow i installed xubuntu and it works fine except that i can't boot back into cromi without flashing unters kernel again, hence losing dual boot with linux. any ideas on how to make dual boot work?? am i missing something? i'm on the 10.4.2 boot loader, us sku tf300t 16gb. i'd really like a dual boot setup without having to use stock rom when cromi is sooooo much better.:rolleyes:

any help would be greatly appreciated
[Galaxy S III Q&A, Help & Troubleshooting] sunnihith:
i have flashed stock rom from cm 10.1 on my s3 i9300.before flashing i had done my apps back up using titanium back up.now i am not able to restore the apps even though titanium backup folder in phone contains all user apps..please help me out
[Galaxy S III Q&A, Help & Troubleshooting] danarama:
Please define "not able". We cant help if we don't know the problem
[Galaxy S III Q&A, Help & Troubleshooting] JJEgan:
Apps backed up under CM 10 ??

jje
[Galaxy S III Q&A, Help & Troubleshooting] sunnihith:
titanium is showing zero apps under restore section..(restore all missing user apps 0).all apps were backed up when i was running on cm 10.1
[Galaxy S III Q&A, Help & Troubleshooting] danarama:
When you first install titanium, scan device for backups

Preferences, backup folder location, scan.

If its in external sd, you must select "whole device"
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] frion:
After flashing openrecovery N8013-starts and SDCard mode written update from sd card was a success! although there was no sd card. this field it is not included and is not determined by the PC
[Nexus 4 Themes and Apps] luiseteyo:
Introduction

Hi everybody! This is not my work, so credits don't go for my but for lambgx02.

His apk is very easy to use and useful at the same time.​

Explanation

On some (older) versions of Android, the JVM (and other components) often read random data from the blocking /dev/random device. On newer builds, this problem has been solved, yet depletion of the input entropy pool still seems to slow devices.

So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.

Result? Significant lag reduction (for some people)!

Note - if you want to try it, you must be running a rooted device, and you only need to install one of the APKs (latest version is best). Then, just open it, and turn it on. The other files (patches / .zips) are intended for recompiling, packaging, and init.d integration. If you uninstall the app, either turn off rngd first (open, and click the on/off button), or reboot afterwards; the UI does not presently kill the daemon on uninstallation.​

I have tested it myself running a max 594 MHz frecuency processor and there was NO lag at all, and I wasn't using the stock launcher but touchwiz one. I really recommend this.

Just open the app, and grant superuser acces. That's it. Enjoy!!

Download

Despite it is a paid app in Google Play, the same author let u download it in the original thread​
[Nexus 4 Themes and Apps] AppReviewBros:
Wait, isn't this just placebo? Or does it really have a positive effect?
[Nexus 4 Themes and Apps] brezzz:
wouldn't this destroy battery life though?
[Nexus 4 Themes and Apps] Xmaster8:
Didnt they prooved a while ago that this doesnt work?
[Nexus 4 Themes and Apps] luiseteyo:
Well I dont think so. In my opinion I dont really know if it is a placebo or not but i cannot find a single lsg using 600Mhz frecuency...

Enviado desde mi Nexus 4 usando Tapatalk 2
[Galaxy Tab 2 Q&A, Help & Troubleshooting] tommeke19:
Hi,

Sorry if asked before!!

But i'm new to the root stuff of a samsung tab.

So if im going to a 4.2.2 rom and it doesnt satisfied me, can i go back to a 4.1.2 rom without any problems?

Thanks
[Galaxy Tab 2 Q&A, Help & Troubleshooting] ddochi11:
Yes.
[Nexus 7 Q&A, Help & Troubleshooting] asdfjkljkl5:
Hi,

I am building my own Nexus 7 dock so I can charge it via the pogo pins. I am using power from the supplied Nexus 7 charger, but when I charge via the pogo pins and then disconnect from them, any form of charging stops (usb or pogo). The only solution I have found to this problem is to wipe the cache and reboot the device. This is inconvenient to require a reboot every time I take the Nexus 7 out of my charging dock. Does anyone have a good solution?

Thanks in advance.

ROM -> SmoothROM-v5.2

KERNEL -> timur-usbhost-2013-04-21-cm10.1

also with multirom and Ubuntu (not part of my problem)
[Nexus 7 Q&A, Help & Troubleshooting] asdfjkljkl5:
update

I was messing around with it some more, and after charging from pogo, only pogo charging would work. I could not charge from usb. I can charge with pogo, unplug, and then re charge from pogo just fine. Any suggestions? It sounds to me like a kernel problem but I want to keep timurs kernel because I can use multiple usb devices at the same time.
[Nexus 7 Q&A, Help & Troubleshooting] rebel1699:
Have you asked timur about this problem? He is always really good about helping diagnose problems and make a fix.