我的 MediaPlayer 有问题!!!!我播放媒体文件,暂停它,然后恢复它,当我回到活动主我的应用程序关闭时。我的代码:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if ((keyCode == KeyEvent.KEYCODE_BACK))
{
if (mediaPlayer != null) {
mediaPlayer.release();
mediaPlayer = null;
}
seekHandler.removeCallbacks(run);
finish();
}
return super.onKeyDown(keyCode, event);
}
帮我 :(