I am trying to use fused location provider to capture location in background every half an hour with PRIORITY_HIGH_ACCURACY. To achieve this, I have used PendingIntent with BroadcastReceiver and requesting for a location update every thirty minutes. Open questions:-
1. Even though the documentation says setInterval(long duration) in inexact in nature, I am not getting location updates at all for several hours at times. In fact, it looks like it has stopped getting location updates completely sometimes.
2. Even though GPS is ON all the time and in movement, at times I get the location as NULL which is worrisome.
Above issues makes the location update logic in background not very reliable. I can use Alarm manager to wake every half hour and request for a location update but this looks an overhead, further this also may not guarantee the location update received will not be NULL.
Any thoughts?