Detect outgoing calls, issue with a real device

末鹿安然 提交于 2020-01-11 09:58:05

问题


I have a strange problem. To detect outgoing calls I have registered a broadcast receiver for android.intent.action.PHONE_STATE. When the state becomes OFFHOOK, then a conversation is started. It seems working on emulator: the debugger in fact reaches some code while it doesn't work on real device (Acer Liquid). Is it possible?
Which is a way to detect outgoing calls?


回答1:


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.



来源:https://stackoverflow.com/questions/2668445/detect-outgoing-calls-issue-with-a-real-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!