I have implemented a simple GPS program that fetches the co-ordinates and displays them on the screen. When I tried to improve on this design and implement an async task, the GP
like many other things , gps listener can only be listened to by a loopy thread (like the ui thread) . the easiest thing to do would be to it via the ui thread .
also , the gps listener isn't named like this for no reason . only when it gets a location (and that could take time) , it will call the method "onLocationChanged" . you don't need to have asyncTask for this , since all of the calls to "requestLocationUpdates" are asynchronous anyway...