Code example for MediaPlayer

Methods: isPlayingpause

0
            queueNextRefresh(refreshDelay);
        } 
    } 
 
    public void pause() { 
        if (mediaPlayer.isPlaying()) {
            mediaPlayer.pause();
 
            isPaused = true;
        } 
    } 
 
    public void stop() { 
        if (mediaPlayer.isPlaying() || isPaused) {
            try { 
                mediaPlayer.stop();
                mediaPlayer.prepare();
                mediaPlayer.seekTo(0);
            } catch (IllegalStateException e) {
                // TODO Auto-generated catch block 
                e.printStackTrace();