How to manage Loopers and Threads (thread doesn't die anymore!)
I created a class extending Thread to retrieve user location through LocationManager in a non-ui thread. I implemented this as a thread because it has to be started on request and do its work just for a limited time. By the way, I had to add a Looper object in the thread, to be able to create the handler for the LocationManager (onLocationChanged). This is the code: public class UserLocationThread extends Thread implements LocationListener { //... public void run() { try { Looper.prepare(); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); Looper.loop();