Reputation: 1874
While using the method
requestLocationUpdates(provider,6000,9,this)
I want to ask when this will be called when 6000 milliseconds is elapsed or when 9m distance is changed.
Kindly update
Upvotes: 0
Views: 23
Reputation: 10270
From the documentation (my bold):
The minDistance parameter can also be used to control the frequency of location updates. If it is greater than 0 then the location provider will only send your application an update when the location has changed by at least minDistance meters, AND at least minTime milliseconds have passed. However it is more difficult for location providers to save power using the minDistance parameter, so minTime should be the primary tool to conserving battery life.
So you will only receive an update once both conditions have been met, i.e. once the device has traveled 9 metres and 6000 miliseconds has passed.
Upvotes: 1