Anton
Anton

Reputation: 4403

Android: LocationManager.requestLocationUpdates doesn't respect params

I have a problem recieving notifications from LocationManager after a set period of time:

    locationManager = (LocationManager)getSystemService(LOCATION_SERVICE);
    if(useGPS) {
        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 999999, 
                999999, locationListener);

In emulator my location listener's onLocationChanged method gets called whenever I send a fix via emulator control (i.e. every other second) So, the question is - is this because the way I'm testing on emulator, or LocationManager doesn't respect params?

Thanks

Upvotes: 0

Views: 819

Answers (1)

Vit Khudenko
Vit Khudenko

Reputation: 28418

The doc says:

minTime - the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value.

Upvotes: 2

Related Questions