Hello all,
my requirement is to get location updates every 90 seconds. I am using
network provider for this.
I am doing this as given below:
locationManager.requestLocationUpdates(
LocationManager.NETWORK_PROVIDER,
MINIMUM_TIME_BETWEEN_UPDATES,
MINIMUM_DISTANCE_CHANGE_FOR_UPDATES,
new MyLocationListener()
);
Here, in this method, I am passing 90000 as MINIMUM_TIME_BETWEEN_UPDATES,
and 0 as MINIMUM_DISTANCE_CHANGE_FOR_UPDATES, so the expected result should
be:
The method onLocationChanged should be called every 90 seconds.
But, the outcome is: the onLocationChanged method is being called first in
75 seconds, then in 105 seconds, then 75, 105.....and so on..
But my requirement is to get the location updates in 90 seconds instead of
different durations/periods.
In case, if location returns null, I want to get the last known location.
Please, suggest me the way to resolve this problem.
Thanks & Regards,
NSR
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en