location-samples
location-samples copied to clipboard
Use WakefulBroadcastReceiver instead of IntentService for handling background triggers to the app
I can't understand why you use IntentService for handling all stuff which happens in background.
Please note that device may go asleep (and it actually does go asleep) during IntentService is doing it's job.
Use WakefulBroadcastReceiver for this purpose which then triggers IntentService.
This issue applies to all examples, in particular GeofenceTransitionsIntentService and DetectedActivitiesIntentService.
More about this problem here http://porcupineprogrammer.blogspot.com/2014/02/when-do-you-absolutely-need.html.