Request location updates based only on min-distance

2.3k views Asked by At

I am developing a location based application in which i want to get location after movement of meter from previous position. I don't want to give minimum time in

void requestLocationUpdates (String provider, 
            long minTime, 
            float minDistance, 
            LocationListener listener)

Is there any way to request location updates based only upon minimum distance?

1

There are 1 answers

0
tim4dev On

Here is all the information I could find (requestLocationUpdates) :

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.