有谁知道在空气中为 android 获取“来电事件”?有资源还是我应该使用 TelephonyManager 自己制作?停用事件不适合我。
问问题
244 次
1 回答
3
Android 设备上的手机处于以下三种状态之一:
CALL_STATE_IDLE (when it is not engaged in any calls),
CALL_STATE_RINGING (when there is an incoming call and device is ringing),
CALL_STATE_OFFHOOK (when the user answers the call)
甚至与 ACTION_PHONE_STATE_CHANGED 广播一起使用的 EXTRA_STATE 查找键TelephonyManager#ACTION_PHONE_STATE_CHANGED 操作也对应于这些状态,如下所示:
EXTRA_STATE_IDLE (Value used with EXTRA_STATE corresponding to CALL_STATE_IDLE)
EXTRA_STATE_OFFHOOK (Value used with EXTRA_STATE corresponding to CALL_STATE_OFFHOOK)
EXTRA_STATE_RINGING (Value used with EXTRA_STATE corresponding to CALL_STATE_RINGING)
因此,要回答您的问题,Android 中目前没有“空中来电”事件。
于 2013-03-04T09:46:09.227 回答