1. Hot New Devices! HTC One M9 | Samsung Galaxy S6 | LG G4

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


  1. elidua

    elidua New Member

    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

    Advertisement
  2. Unforgiven

    Unforgiven ~Shoveling Snow~ Moderator

    Application Development thread moved to the Development forum for better exposure.:)
    codesplice likes this.

Share This Page