android - LocationManager minDistance -


my sample code:

locationmanager.requestlocationupdates(locationmanager.gps_provider, 30000, 50.0f, this);   . . .  public void onlocationchanged(location loc) {      system.out.println(loc.getlatitude()+ " - " + loc.getlongitude());         } 

my mindistance parameter set 50.0f (50 metres)

but onlocationchanged called many times if dont move phone @ all.

as found docs:

the mindistance parameter can used control frequency of location updates. if greater 0 location provider send application update when location has changed @ least mindistance meters.

so question why location changed ?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -