I have been working and testing on background location updates using GoogleApiClient
for Interval and Displacement based updates. On testing and analyzing for a few days I figured out some variations in the output which I did not expect.
While using
setInterval
andsetFastestInterval
for Interval based updates, say I have set an Interval as 15 mins and Fastest Interval as 10 mins, 90% of the time I am getting updates in the expected Interval (10 to 15 mins). But sometimes I noticed that the updates take much longer time than the specified Interval, like, the difference is around 30 mins and 60 mins. Any Idea about why is the difference?While using
setMinimumDisplacement
for Distance based updates, say I have set a Displacement as 200 meters, I am getting updates only on stationary points(While travelling it doesn't give updates even if it is more than 200 meters) which are 200 meters and above. Is this how it works normally?
I am using PendingIntent
type of location requests in order to receive location updates in BroadcastReceiver
for location updates in background.
fusedLocationProviderClient.requestLocationUpdates(locationRequest, pendingIntent);
While testing, the Location Services were ON and Location Mode was HIGH_ACCURACY.