Answers for "mediaPlayer callback when done"

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

Code answers related to "mediaPlayer callback when done"

Browse Popular Code Answers by Language