My app is composed of a single Activity
. In this activity, I\'m creating multiple HandlerThread
s which run in a loop to do socket blocking operations.<
The HandlerThread is stopped when the Looper is quitted. HandlerThread.getLooper().quit() when you stop your activity. (see http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/app/IntentService.java#IntentService.ServiceHandler.%3Cinit%3E%28android.os.Looper%29 for a good example of a proper HandlerThread use)