Answers for "how to detect when media player is done playing android"

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 "how to detect when media player is done playing android"

Browse Popular Code Answers by Language