我有一个奇怪的问题。为了检测拨出电话,我注册了一个广播接收器android.intent.action.PHONE_STATE
。当状态变为 OFFHOOK 时,开始对话。它似乎在模拟器上工作:调试器实际上到达了一些代码,而它在真实设备(Acer Liquid)上不起作用。可能吗?
哪种方法可以检测拨出电话?
问问题
4818 次
1 回答
4
Well, if it works on the emulator, I would expect it to work on the device. You might registering a PhoneStateListener
with the TelephonyManager
via listen()
and see if it gets you better results.
If you think of it, comment on this answer with the results of your testing.
于 2010-04-19T16:03:54.530 回答