Reputation: 41
I have a problem here that I added a Sound in my app and it plays normally, but I would like that when I close the app (return to the home screen) the sounds stop playing. The only way I can stop it now is killing the app that continued to run in background.
Is there something I can do to stop any sound that the app does?
Upvotes: 0
Views: 463
Reputation: 127
call the mediaPlayer.stop() method when finish MainActivity class.
good luck to you!
Upvotes: 0
Reputation: 847
Do you play your music in Service? Anyway, you should stop the playing manually in onStop method.
Upvotes: 1