检测拨出电话,在真实设备上发出 [英] Detect outgoing calls, issue with a real device

查看:73
本文介绍了检测拨出电话,在真实设备上发出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题.为了检测呼出电话,我已经为android.intent.action.PHONE_STATE注册了广播接收器.当状态变为OFFHOOK时,便开始对话.似乎可以在模拟器上运行:实际上,调试器会获得一些代码,而不能在实际设备(Acer Liquid)上运行.有可能吗?
哪一种检测呼出电话的方法?

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?

推荐答案

好吧,如果它可以在模拟器上运行,我希望它可以在设备上运行.您可以通过listen()TelephonyManager注册PhoneStateListener,看看是否可以获得更好的结果.

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.

这篇关于检测拨出电话,在真实设备上发出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆