Possible Duplicate:
requestLocationUpdates throws exception
I’m trying to create a service that when the server ask me, send my location. but can not find the way to do it, since everything is a background service. and I do not need to have UI interface. when I call requestUpdate () throws me an error and stops the application
locManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, 15000, 0, locationListener);
runException Can’t create handler inside thread that has not called Looper.prepare()
How I can run something to update the position from my service?
anyone have any example or something to help me? I have not much experience yet.
Well, its famous problem, See response in your Exception:
You need provide application’s main looper.
Here is valid implementation: