top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Why do we have to use locationManager.requestLocationUpdates?

+2 votes
331 views

Why do we have to use locationManager.requestLocationUpdates, why can't android just return the updated position as user moves automatically?

posted Sep 7, 2016 by Akshay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Basically, you set minTime and minDistance along with other parameters for requestLocationUpdates.

minTime - is the minimum time that android will take to call location change handler.
minDistance - is the minimum distance that android will wait for before it calls the location change handler.

It is usually recommended to keep the minTime (also minDistance) as high as possible to save the power source (battery charge).

As developers (or product owner) we should decide on the minimum triggering factor based on our needs.

answer Sep 7, 2016 by Vinod Kumar K V
Similar Questions
+2 votes

Are there any usage limits on LocationManager.NETWORK_PROVIDER?For example, is there a limit on the number of uses per day, or is limited to personal use.

LocationManager.NETWORK_PROVIDER http://developer.android.com/reference/android/location/LocationManager.html#NETWORK_PROVIDER

I find the LocationManager.NETWORK_PROVIDER and The Google Maps Geolocation API very similar.(It is possible to know the position information from the cell tower or wifi both.)

The Google Maps Geolocation API https://developers.google.com/maps/documentation/business/geolocation/

The Google Maps Geolocation API has usage limits and costs money, are there any usage limits like these on LocationManager.NETWORK_PROVIDER?

...