Italian [B4A] eseguire una telefonata [RISOLTO]

Xfood

Expert
Licensed User
Lo allego io in zip, sul cell utilizzo totalcmd
 

Attachments

  • SimplePhone.zip
    8.2 KB · Views: 118

LucaMs

Expert
Licensed User
Longtime User
Sorgente di Aldo:
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


Dovrebbe essere così:
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 B4XPage_Permissionresult(Permission As String, Result As Boolean)
        If Result=True Then
            Dim ph As PhoneCalls
            StartActivity(ph.Call(Tel))
        End If
    End If
End Sub

Non ho ancora provato se funzioni; mi pare manchi qualcosa nel Manifest.
 

Xfood

Expert
Licensed User
Avevo aperto il sorgente, con il cell
e stavo per scrivere la stessa cosa
Sul mio cell, non trovo il manifest
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…