To send an SMS the following code should be valid
or
However I get the following error
Where am I wrong ?
Thanks in advance
B4X:
Dim Sms1 As PhoneSms
Sms1.Send(telnum,txtSMS)
B4X:
Dim Sms1 As PhoneSms
Sms1.Send2(telnum,txtSMS, False,False)
despite having indicated in Manifestjava.lang.SecurityException: Sending SMS message: uid 10214 does not have android.permission.SEND_SMS.
and also having used the subAddPermission(android.permission.SEND_SMS)
B4X:
Sub CheckPermissions As ResumableSub
For Each per In Array(rp.PERMISSION_READ_CONTACTS ,rp.PERMISSION_ACCESS_FINE_LOCATION, rp.PERMISSION_WRITE_EXTERNAL_STORAGE, rp.PERMISSION_SEND_SMS)
rp.CheckAndRequest(per)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If Result = False Then Return False
Next
Return True
End Sub
Thanks in advance