MediaPlayer play audio in background and play next one
问题 I use below code to play audio in background: String[] Path = new String[] {path1, path2, ...}; mMediaPlayer.setDataSource(Path[i]); mMediaPlayer.prepare(); mMediaPlayer.start(); mMediaPlayer.seekTo(0); While I play the first one Path[0] in background. I want to make it auto play next one Path[1] after Path[0] play finish, how to arrive it? 回答1: You should override onCompletionListener like this, mMediaPlayer.setOnCompletionListener(new OnCompletionListener() { public void onCompletion