Thursday, 10 January 2019

How to handle services that run as foreground when an app is cleared from recent?

My Android app is playing audio while the app runs in the background with a service that runs as foreground, similar to many other apps such as Google Play Music, Spotify, and other music players / podcast player apps.

Most apps I checked, including Google Play Music, will leave the service running even when the app is cleared from recent. On the other hand, some will stop the audio and close the service (I only found Spotify doing that).

I am wondering what is the right way to handle this? Although most apps leave the service open, it seems that users will expect the audio to stop and the notification to disappear from the status bar together with the app.

Is there a right way here?



from How to handle services that run as foreground when an app is cleared from recent?

No comments:

Post a Comment