Android Question Background Music Not Stopping

Mohamed Akbarally

Member
Licensed User
Longtime User
Hi, I'm running some background music through a service, but the only problem is that when the app is exited(running in completely in the background) the music continues to play. Is there a way to kill the music when there are no activities visible?
 

NJDude

Expert
Licensed User
Longtime User
Ok here's the deal, services run in the background, so, you will have to find a way to stop them, in this case, by exiting the app (like I explained previously), the HOME key cannot be captured but it will pause the app, so in conclusion, you can only stop the music playing IF the user EXITS the app.
 
Upvote 0

Mohamed Akbarally

Member
Licensed User
Longtime User
Ok here's the deal, services run in the background, so, you will have to find a way to stop them, in this case, by exiting the app (like I explained previously), the HOME key cannot be captured but it will pause the app, so in conclusion, you can only stop the music playing IF the user EXITS the app.
OK then forget services, is there any possible way to implement background music into an application that runs seamlessly across multiple activities, and closes at exit? there must be some way, how do other apps do it?
 
Upvote 0
Top