Requestlocationupdates Parameters
Thats how the requestLocationUpdates looks like(the way I use it): requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) My question
Solution 1:
The documentation on requestLocationUpdate()
says:
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
So both parameters must be satisfied before you'll receive an update if you specify non-0 values.
Solution 2:
If you set minTime to 0, it will be called once when it first receives a location update, then it won't be called until you change your position in minDistance meters.
Solution 3:
After the minimum distance change is received, it will wait for the minimum time to pass before updating.
Post a Comment for "Requestlocationupdates Parameters"