AddReceiverText(stimer,
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>)
AddReceiverText(stimer,
<intent-filter android:priority="2147483647">
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>)
B4X:AddReceiverText(stimer, <intent-filter> <action android:name="android.intent.action.NEW_OUTGOING_CALL" /> </intent-filter>)
I dont want to replace the icon itself. I just want my program to pop up after the call was placed, to show a screen like this:
![]()
It pops up some times, others the stock dialer does. Is there some XML code or whatever to give my app the priority?
Sub Process_Globals
Dim PE As PhoneEvents
End Sub
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
Dim PhoneFlag
If State = "RINGING" AND IncomingNumber<>"" Then 'incoming call
PhoneFlag = 1
End If
If State = "OFFHOOK" AND PhoneFlag = 1 Then 'answering to incoming call
PhoneFlag = 2
End If
If State = "OFFHOOK" AND IncomingNumber="" AND PhoneFlag <> 2 Then 'out call
StartActivity(youractivityname) ' here you launch your screen
End If
End Sub
AddPermission(android.permission.READ_PHONE_STATE)
AddPermission(android.permission.PROCESS_OUTGOING_CALLS)
AddPermission(android.permission.CALL_PHONE)
AddReceiverText(S1, <intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>)