Thursday, December 5, 2013

What to do to stop a thread in Android?

Options:

1)
if(threadOne != null) {
Thread temp = threadOne;
threadOne = null;
temp.interrupt();
}

2)
Declare threads as Daemon threads.

threadOne.setDaemon(true);
threadOne.start();

Excelent repository for Android Source Code

I recently found out an excellent repository for android source code.

http://grepcode.com

Thanks to people who took time to develop this.

Android Implicit Intent

How to login to my android device from terminal

Steps

1. sudo adb start-server

2. Check whether you are able to view your device
sudo adb devices

3. Start the shell:
sudo adb shell.

Listing all the packages installed:

pm list packages