I am working on a foreground-enabled application that plays audio for a long period of time.
I do not want the Android OS to kill my service while running in the background, however I want to stop the service if the application is closed manually from the task manager.
The current behavior of my application is that services continue to run when the application closes in the task manager.
I noticed that Spotify achieves the desired effect, how is this done?
android service
Jacob tabak
source share