如何播放音频并等待完成以再次播放?. 在这个我可以玩很多时间: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();
};
});
}
}
});