Android Question Sending SMS and Trying to Release App into Google Play Store

Azhar

Active Member
Licensed User
Longtime User
Hi

I've read this thread: https://www.b4x.com/android/forum/t...ssions-are-no-longer-available.98100/#content

Does this mean we cannot use the 'dangerous permission' to send an SMS within an app even though it is declared in the Manifest which requests user permission?
I am unable to complete a Permission Declaration Form within the App Content UI of Google's Play Console. If we cannot utilise the SMS feature, why is Google asking for a Permission Declaration Form?

So confusing and frustrating.

Thanks,

Azhar
 

DonManfred

Expert
Licensed User
Longtime User
Only the devices default smsapp is allowed to send SMS.
 
Upvote 0

Azhar

Active Member
Licensed User
Longtime User
Oh dear. That doesn't look so good but I guess I can make a work around. it'll mean the user will have to review and accept the message, click OK then click send again on the message inserted into the phone's default SMS app.

Seems a step backwards to me on Google's part.

Azhar
 
Upvote 0

Azhar

Active Member
Licensed User
Longtime User
...but I can't get the phone's SMS app to fill the message to send box with this code provided:
The default SMS app will launch but the message to send text box won't be populated with the given message passed to it.
B4X:
Sub btnSend_Click
'    ToastMessageShow("Sending...", False)
'    SendLargeSms(Main.gblSMSnumber, strSMScompose, "Extra")
'    SMScheckTimer.Enabled = True    'phone events - test if sent/delivered
    Dim In As Intent
    In.Initialize(In.ACTION_VIEW, "sms:" & Main.gblSMSnumber)
    In.PutExtra("SMS", strSMScompose)
    StartActivity(In)
    Log("Sent SMS to handler")
End Sub

But if I create an app containing just a button control with this code in it's clicked event, it works fine - same phone etc.
There's no error or anything.
Main.gblSMSnumber as a String
I have no idea why.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Try replacing:

B4X:
In.PutExtra("SMS", strSMScompose)

With
B4X:
In.PutExtra("sms_body", strSMScompose)
 
Upvote 0

Azhar

Active Member
Licensed User
Longtime User
Thank you JohnC - I didn't realise that was a parsed command. I presumed it was free text.

Thanks so much. Azhar
 
Upvote 0
Top