Answers for "mediaplayer done playing media"

2

how to notify when media player is done playing android

MediaPlayer mp = MediaPlayer.create(this,Uri.parse("android.resource://emad.app/raw/seven_chimes"));

mp.setOnCompletionListener(new OnCompletionListener() {

    @Override
    public void onCompletion(MediaPlayer mp) {
        performOnEnd();
    }

});

mp.start();
Posted by: Guest on October-31-2020

Browse Popular Code Answers by Language