检测呼出电话和问题,一个真实的设备 [英] Detect outgoing calls and problem with a real device

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

问题描述

我有一个奇怪的问题。为了检测打出的电话我已经注册的广播接收器 android.intent.action.PHONE_STATE 。当国家变得OFFHOOK,然后对话开始。这似乎正在模拟器:其实调试器达到约code,而它并没有在实际设备(宏碁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?

感谢

推荐答案

那么,如果它工作在模拟器上,我希望它的工作设备。你可以注册一个 PhoneStateListener TelephonyManager 通过听(),看看它是否让你更好的结果。

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天全站免登陆