1

Since Android Oreo is released, location updates are only happening a few times in an hour when app is in background. In my case, I have an app that needs frequent location updates when user locks screen (app is in background).

The Google Developer Docs provides this solution:

'Start a foreground service in your app by calling startForegroundService(). When such a foreground service is active, it appears as an ongoing notification in the notification area.'

There is no example available. Is it enough to start a simple foreground service, or is it needed to migrate all location logic to this foreground service? It's not clear to me if it is good enough to start just a custom, simple foreground service or if I need to put all my location logic in this foreground service.

Sven Nijs
  • 498
  • 3
  • 19

0 Answers0