hi! please help me whith library PHONE...
I write the call code by number when I press the button. But my code doesn't work. I get errors in the debugger
my code is:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
End Sub
Public Sub Initialize
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
End If
End Sub
Private Sub Button1_Click
Dim p As PhoneCalls
StartActivity(p.Call("123456789"))
Dim I As Intent
I.Initialize(I.ACTION_CALL, "tel:" & phonenumber)
StartActivity(I)
And make sure you have this in your manifest:
B4X:
AddPermission(android.permission.CALL_PHONE)
And have this for the runtime permission:
B4X:
Dim RP As RuntimePermissions
RP.CheckAndRequest(RP.PERMISSION_CALL_PHONE)
Wait For Activity_PermissionResult (Permission As String, AskResult As Boolean)