public void onCallStateChanged(int state, String incomingNumber) {
Log.i("CALL_STATE changed " ,"phoneState");
switch (state) {
case TelephonyManager.CALL_STATE_IDLE:
Log.i("IDLE","CALL_STATE_IDLE");
break;
case TelephonyManager.CALL_STATE_OFFHOOK:
//This is where we know call is established
Vibrator mVibrator = (Vibrator) mcontext.getSystemService(mcontext.VIBRATOR_SERVICE);
// Vibrate for 250 milliseconds
mVibrator.vibrate(250);
break;
case TelephonyManager.CALL_STATE_RINGING:
Log.i("RINGING","CALL_STATE_RINGING");
break;
default:
Log.d("TAG", "Unknown phone state=" + state);
}
}
在摘机状态下,即被叫方接听电话时,手机不振动。可能的原因是什么?