Hello everyone, I would like to create an app that allows me to make a sequence of phone calls to be interrupted while it is ringing after about 5 seconds, every 5 seconds the app must call a number entered in a list of numbers and when it closes the call switch to next number, the problem lies in blocking the call in progress, being that during the call the app goes in the background there is a method to intercept the end call button from the code or to be able to close the call automatically? I am using the phone library to make the call but I don't find how to close it automatically after a few seconds.
B4X:
#Region Project Attributes
#ApplicationLabel: Auto_Chiamate
#VersionCode: 1
#VersionName: 1.0
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: True
#BridgeLogger: True
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private btnchiama As Button
Private rp As RuntimePermissions
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnchiama_Click
rp.CheckAndRequest(rp.PERMISSION_CALL_PHONE)
Wait For Activity_PermissionResult ( Permission As String, Result As Boolean)
If Result Then
Dim p As PhoneCalls
StartActivity(p.Call("xxxxxxxx"))
Else