News for hackers. Stuff that matters.
Re:Previewing Android P by nl on Thursday March 08, 2018 @03:50AM (#16543206)
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.