What happen if requestLocationUpdates() parameters minTime and minDistance are both 0

75 views Asked by At

If I code:

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);

Is that mean the location will be updated in real-time (every 0 millisecond and every 0 meter) or it won't be updated? Sorry if my question is so basic. Thank you..

1

There are 1 answers

0
CommonsWare On

Is that mean the location will be updated in real-time

No.

it won't be updated?

No.

It means that there is no requested limit as to how frequently you will receive updates. How frequently you actually receive updates will depend on circumstances. For example, the user may be in a location where GPS signals cannot be received very well.