I researched online and saw that Location Manager.requestLocationUpdates method and saw that it took an argument of minDistance. The definition that the site(http://blog.doityourselfandroid.com/2010/12/25/understanding-locationlistener-android/) gave me for that argument was "minimum distance interval for notifications" with an example of 10 meters. Can anyone clarify what that means? Everytime i move 10 meters with a phone, i get an gps update?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Yes, essentially this means that if the platform observes your current position as being more than
minDistance
from the last location that was saved by the platform, your listener will get notified with the updated position. Note that these two positions don't necessarily need to be sequential (i.e., there could be a number of small displacements that eventually add up tominDistance
, and the location that finally exceeds the threshold will be the one reported to the app).The actual platform code can be seen on Github, which I've also pasted below:
Note that
minDistance
parameter only affects when your app gets notified if the value is greater than0
.Also please be aware that with all positioning systems there is a significant level of error when calculating locations, so with small
minDistance
values you may get notified frequently, but these notifications may be error in positioning calculations, not true user movement.