Define foreground/background.
If I’m using Strava and Spotify I don’t want either to stop working when I switch to the user interface of the other one.
Re:Previewing Android P
by on_and_off on Thursday March 08, 2018 @04:06AM
(#16543253)
A foreground service needs to display a notification.
Not really an issue for Spotify since media apps want to display the media notification anyway.
For other apps, the idea is that foreground services should be visible to the user. One of the reasons would be this very capability to access sensors.
Another difference between foreground and background is that a background service is eligible to be killed on low memory events.
Am I missing something ?
The only case I see this change not covering is apps like Cerberus. They would need to ask their users to go to settings and hide their notification. Not the nicest UX, but that's a pretty rare use case.