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.
Update GPS every x seconds or every y meters
-
28-06-2022 - |
Pregunta
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?
Solución
Otros consejos
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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow