user13 user13 - 4 months ago 10
Android Question

What's the best practice to do something after a location update?

This is more of a theoretical question.
I'm using

LocationManager.requestSingleUpdate()
for a single location update request and i want to do something with the location. The problem is the update is asynchronous and i don't know when does it finish exactly.
What's the best practice to call something exactly after the location update finishes and never before?

Thanks in advance!

Answer

In your LocationListener in onLocationChanged. It seems it's the only place you can do something