标签:pre mode lis vibrator rac err systems cep ioservice
if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) {
shouldPlayBeep = false;//检查当前是否是静音模式
}else{
shouldPlayBeep = true;
}
////////////////////////////
if (shouldPlayBeep && mediaPlayer != null) {
mediaPlayer.start();
try {
Thread.sleep(1300);
mediaPlayer.reset();
mediaPlayer.release();
} catch (InterruptedException e) {
e.printStackTrace();
}
// mediaPlayer.stop();
}else{
Vibrator vib = (Vibrator) context.getSystemService(Service.VIBRATOR_SERVICE);
vib.vibrate(milliseconds);
}
标签:pre mode lis vibrator rac err systems cep ioservice
原文地址:https://www.cnblogs.com/cw828/p/10110948.html