Skip to content Skip to sidebar Skip to footer

Launching An Activity From A Broadcast Receiver That Listens To Outgoing Call

I am trying to launch an activity from a broadcast receiver that listens to outgoing call which is 5556. The problem is, the activity is not being launched but the dial inbuilt act

Solution 1:

In your manifest you require one permission (according to the docs):

You must hold the PROCESS_OUTGOING_CALLS permission to receive this Intent.

And that is

"android.permission.PROCESS_OUTGOING_CALLS"

Also straight from the docs:

Any BroadcastReceiver receiving this Intent must not abort the broadcast.

And here is the link to the page where I got the info:

http://developer.android.com/reference/android/content/Intent.html

Solution 2:

Instead of aborting broadcast with abortBroadcast(); use setResultData(null) to end the call after launching your activity.

Post a Comment for "Launching An Activity From A Broadcast Receiver That Listens To Outgoing Call"