Reputation: 2504
Checking my app's behavior on M Preview device, it seems that its foreground (with active notification) service playing music is not affected by Doze mode. But reading docs it seems that foreground services are exempt only from AppStandby.
What is the real rule?
Upvotes: 17
Views: 9642
Reputation: 89
Attention, Foreground service can prevent your app never into app standby, but not doze.
Here use adb cmd to test
$ adb shell dumpsys battery unplug
$ adb shell am set-inactive <packageName> true
Upvotes: 0