Diego Prestes
Diego Prestes

Reputation: 41

AIR Android Sound continues playing after I close the app

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

Answers (2)

Ahmad Azarnia
Ahmad Azarnia

Reputation: 127

call the mediaPlayer.stop() method when finish MainActivity class.

good luck to you!

Upvotes: 0

grig
grig

Reputation: 847

Do you play your music in Service? Anyway, you should stop the playing manually in onStop method.

Upvotes: 1

Related Questions