Android 9: how to get locations with power saving mode and screen off

494 Views Asked by At

As documented officially, Android 9 makes a number of improvements to battery saver mode. For example, location services may be disabled when the screen is off. See https://developer.android.com/about/versions/pie/power#battery-saver

I tested it on a Pixel 2. Concretely, when power saving mode is activated and the screen turned off, the LocationManager is stopped by the system (GnssStatus.Callback onStopped() is called).

Is there another way to get locations, when the screen is off with power saving mode enabled? Do you have any idea how the big players are doing it (Strava,...)?

Thanks for your help!

0

There are 0 best solutions below