如何检测android手机通话广播接收器接收器、手机、android

2023-09-06 19:10:48 作者:安安分分的男人

我在建设一个android的应用程序,它会执行一个动作,当任何电话会在我的手机上。我曾与广播接收器和电话状态侦听尝试这个。但它不工作。如果我使用的活动,然后手机状态监听器运作良好,并不错,但它不与广播接收器的工作。我在做什么错了?请任何机构帮助....

I am building an application in android, which will perform an action when any phone call will come in my phone. I have tried this with broadcast receiver and phone state listener. But it is not working. If i use activity then phone state listener works well and good but it is not working with Broadcast receiver. What i am doing wrong? Please any body help....

感谢和放大器;问候

推荐答案

您可以找到一些基本的code表示,在这个职位:

You can find some base code for that in this posts:

how重新获取呼入电话的振铃的同时并将其存储在一个变量的Andr​​oid多少?

如何阻止Android中通话