• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Stop MediaPlayer from playing when back button pressed

AndroidMan1

Member
Does anyone know how to stop a mediaplayer from playing a looped sound when the back button is pressed or the home button, i have tried many things but none have solved this problem. This problem needs solving as it ruins my app.
:/


Thanks In Advance
 
We're not sure what you have tried to fix it....

Have you tried opening the app and pressing the menu button to find a setting where actions are linked to button presses?
 
We're not sure what you have tried to fix it....

Have you tried opening the app and pressing the menu button to find a setting where actions are linked to button presses?

I have tried every suggestion on google for this problem but the program either force closes when back button pressed or just does not have any effect on the sound. Yes this includes the method where you put commands to stop the sound when the button is pressed. I am now going to try to use soundpool again as i don't think many people know how to use mediaplayer when looped.
 
Back
Top Bottom