djpero Member Licensed User Longtime User Oct 16, 2012 #1 Hi, i'm new to intents and asking is there way to use permision PROCESS_OUTGOING_CALLS in some service to do something. Thnx Erel said: 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 Click to expand... I found this, and wondering how code will look like with use of Reflector Last edited: Oct 16, 2012
Hi, i'm new to intents and asking is there way to use permision PROCESS_OUTGOING_CALLS in some service to do something. Thnx Erel said: 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 Click to expand... I found this, and wondering how code will look like with use of Reflector
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2012 #2 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
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
djpero Member Licensed User Longtime User Oct 18, 2012 #3 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
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?
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2012 #4 You will not be able to abort the call with this solution. You might be able to do it with the BroadcastReceiver library. I'm not sure. Upvote 0
You will not be able to abort the call with this solution. You might be able to do it with the BroadcastReceiver library. I'm not sure.
djpero Member Licensed User Longtime User Oct 19, 2012 #5 Ok, thnx Erel but seems to be that not always the case, sometimes application is faster then CALL .... Upvote 0
Ok, thnx Erel but seems to be that not always the case, sometimes application is faster then CALL ....