Hi, I'm a newbie to B4A.
I made an app in Kotlin that dials a number when a button is pressed.
I've tried doing this in B4A but permission is not given:
In Manifest File:
AddPermission(android.permission.CALL_PHONE)
(I've added the phone library).
In Main:
Sub call_Button_Click
myphone=myphone.Trim
Dim mynumber As String
Dim i As Intent
mynumber="tel:" & myphone
If rp.Check(rp.PERMISSION_CALL_PHONE)=False Then Return
i.Initialize(i.ACTION_CALL, mynumber)
StartActivity(i)
End Sub
On stepping through the code in debug mode rp.Check(rp.PERMISSION_CALL_PHONE) returns False
What am I doing wrong?
I made an app in Kotlin that dials a number when a button is pressed.
I've tried doing this in B4A but permission is not given:
In Manifest File:
AddPermission(android.permission.CALL_PHONE)
(I've added the phone library).
In Main:
Sub call_Button_Click
myphone=myphone.Trim
Dim mynumber As String
Dim i As Intent
mynumber="tel:" & myphone
If rp.Check(rp.PERMISSION_CALL_PHONE)=False Then Return
i.Initialize(i.ACTION_CALL, mynumber)
StartActivity(i)
End Sub
On stepping through the code in debug mode rp.Check(rp.PERMISSION_CALL_PHONE) returns False
What am I doing wrong?