I had this simple doubt.
I have to display a progress dialog when the phone is getting location update.
Do I need to do this in a separate thread or does getLastKnownLocation already run in a separate thread.
If it doesnt can anyone please post a small sample code, the most effective way to do this?
I went through the android api source and did not succeed in finding out the working.
I had this simple doubt. I have to display a progress dialog when the
Share
getLastKnownLocationruns synchronously and it doesn’t actually get the current location (which is what you probably want). Here is the documentation: http://developer.android.com/reference/android/location/LocationManager.html#getLastKnownLocation%28java.lang.String%29The highlights:
What you probably want is something more along the lines of this question: displaying progress dialog at the start of a gps application