How to solve this problem when an incoming call arrives?
I want BroadcastReceiver to rec开发者_运维知识库eive incoming call, so I used
<receiver>--android.intent.action.ANSWER --</receiver>
in manifest file and my receiver class contains this code
if(intent.getAction().equals(Intent.ACTION_ANSWER)){}
but my receiver class doesn't receive any incoming call and does not response to me. How to solve this problem?
Thanks All
This action is not a receiver, but an activity one. You can't get receiver to receive the intent. See here. Use an activity instead.
See this example.
精彩评论