Process_outgoing_calls

djpero

Member
Licensed User
Longtime User
Hi,

i'm new to intents and asking is there way to use permision PROCESS_OUTGOING_CALLS in some service to do something.

Thnx

It should be possible to intercept outgoing calls.

You should add an intent filter and listen to: android.intent.action.NEW_OUTGOING_CALL

See this example: http://www.b4x.com/forum/showthread.php?p=116193

I found this, and wondering how code will look like with use of Reflector
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Create a service named s1 with this Service_Start code:
B4X:
Sub Service_Start(startingIntent As Intent)
   Log(startingIntent)
   Log(startingIntent.ExtrasToString)
End Sub

Add this code to the manifest editor:
B4X:
AddPermission(android.permission.PROCESS_OUTGOING_CALLS)
AddReceiverText(s1, <intent-filter>
            <action android:name="android.intent.action.NEW_OUTGOING_CALL" /> 
            <category android:name="android.intent.category.DEFAULT" /> 
        </intent-filter>)

Make a phone call and check the logs...

See this tutorial for more information about intent filters:
http://www.b4x.com/forum/basic4andr...pting-sms-messages-background.html#post116193
 
Upvote 0

djpero

Member
Licensed User
Longtime User
Erel,

thnx for info, i made some test and you put me to the right direction. I'm not laying you, I want to hide my app to access with some combination on dialpad ( like ##1234), and that is working, but the dialer always place a call. How to prevent that?
 
Upvote 0

djpero

Member
Licensed User
Longtime User
Ok, thnx Erel

but seems to be that not always the case, sometimes application is faster then CALL ....
 
Upvote 0
Top