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

Apps How to stop MediaPlayer onPause() if i start it onButtonClick ?

elidua

Lurker
Hello guys, i am a noob programer and i encountered a problem, i have a mediaplayer.start() inside an onClick method, if i call mediaplayer.stop(); mediaplayer.reset();mediaplayer.release(); it will crash and get the error: ,, Attempt to invoke virtual method 'void android.media.MediaPlayer.stop()' on a null object reference " . Any support is highly apreciated xD
 
Back
Top Bottom