Code example for MediaPlayer

Methods: releasestop

0
          updatePlayPauseButton(); 
    } 
 
    public void stop() { 
      if (mMediaPlayer != null) {
          mMediaPlayer.stop();
          mMediaPlayer.release();
          mMediaPlayer = null;
      } 
      updatePlayPauseButton(); 
    } 
 
    public boolean isPlaying() { 
        if (mMediaPlayer != null) {
            return mMediaPlayer.isPlaying();
        } else { 
            return false; 
        } 
    } 
 
    public void updatePlayPauseButton() {