0

My app is designed to record a GPS location about once every 30 minutes. This is done as a background service and I also include a wake lock to keep the app running even when the screen goes off or when the user presses the power button to go into sleep mode.

The app does seem to work for the most part but I have noticed on a number of occasions that it fails to record when the device has been off for an extended period of time, like an hour. If I turn on the device after a long period and then start Google Maps, it seems that the GPS then gets activated and then recording in my app does start.

Could there be something that disables GPS during a long sleeping period? How can I tell if my app is really running after this extended sleep period? Does Android shut down apps after a long period even if they do have a wakelock enabled?

I'm running this on Android 2.3

Johann
  • 27,536
  • 39
  • 165
  • 279

0 Answers0