Question

My application must get the coordinates every 100m or every 150 seconds. If the last position was less far then 80m (so i must have the new coordinate even if i'm still in the same place), the application can end correctly. I found the requestLocationUpdates(provider, minTime, minDistance, locationListener) but the minTime is just a hint (i get the new point every 100m, but if i stay in the same point, nothing happens). Is there a way to resolve this?

Was it helpful?

Solution

If you don't get an event within minTime time, you know you haven't moved and you can pretend you did get that event.

OTHER TIPS

requestLocationUpdates(provider, minTime, minDistance, locationListener)

In this you will also recieve a location may be similar to the previous one after every minTime interval look at the docs

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top