开发者

Detect outgoing calls, issue with a real device

开发者 https://www.devze.com 2022-12-27 04:25 出处:网络
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 seem

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 de开发者_如何转开发bugger 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消