如何播放音频并等待完成后继续播放?在这个问题中,我可以无限次播放:D
ivSelect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
// Toast.makeText(context, "Hello", 1000).show();
mMediaPlayer = MediaPlayer.create(context, sound);
if (mMediaPlayer.isPlaying() == false) {
mMediaPlayer.start();
mMediaPlayer
.setOnCompletionListener(new OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
mp.release();
};
});
}
}
});