Android: I need a button that kills anything played by the MediaPlayer – Education Career Blog

I have an app that plays several different audio files on a loop, via several different buttons. I want to program a single button that will stop the MediaPlayer, regardless of what audio file is currently being played. Any help with this would be greatly appreciated.

,

Call stop() on your MediaPlayer object to stop the playback of whatever the MediaPlayer is playing.

Leave a Comment