Private Sub Button1_Click
If EditText1.Text = "" Then
xui.MsgboxAsync("Numero di telefono non inserito!","Attenzione")
Else
Tel=EditText1.text
End If
Dim ro As Object = Msgbox2Async("Vuoi telefonare al numero " & Tel & "?","Telefona al contatto","SI","","NO",Null,False)
Wait For (ro) Msgbox_Result (res As Int)
If res=DialogResponse.POSITIVE Then
rp.CheckAndRequest(rp.PERMISSION_CALL_PHONE)
Wait For Activity_Permissionresult(Permission As String, Result As Boolean)
End If
End Sub
Private Sub B4XPage_Permissionresult(Permission As String,Result As Boolean)
If Result=True Then
Dim ph As PhoneCalls
StartActivity(ph.Call(Tel))
End If
End Sub