N Nishan15 New Member May 18, 2020 #1 I am looking for any working library for sending SMS directly from B4A code without user intervention . By using "Intet" , it need user action to click "Send" Button in messaging app. B4X: Dim In As Intent In.Initialize(In.ACTION_VIEW, "sms:" & number) In.PutExtra("sms_body", "this is the body") StartActivity(In)
I am looking for any working library for sending SMS directly from B4A code without user intervention . By using "Intet" , it need user action to click "Send" Button in messaging app. B4X: Dim In As Intent In.Initialize(In.ACTION_VIEW, "sms:" & number) In.PutExtra("sms_body", "this is the body") StartActivity(In)
Erel B4X founder Staff member Licensed User Longtime User May 18, 2020 #2 Use PhoneSms.Send from the Phone library. Make sure to read about runtime permissions. Upvote 0
JohnC Expert Licensed User Longtime User May 18, 2020 #3 Basically, your app can not send an SMS without user intervention unless: 1) Your app is configured to be the "default" sms app for the device (which will disable the factory SMS app that came with the phone) 2) Or use a third party service like Twilio to send the SMS (but then it will NOT be from the devices phone number, it will be from the number reserved with the third-party service) Upvote 0
Basically, your app can not send an SMS without user intervention unless: 1) Your app is configured to be the "default" sms app for the device (which will disable the factory SMS app that came with the phone) 2) Or use a third party service like Twilio to send the SMS (but then it will NOT be from the devices phone number, it will be from the number reserved with the third-party service)
Erel B4X founder Staff member Licensed User Longtime User May 18, 2020 #4 @JohnC is correct (https://www.b4x.com/android/forum/t...og-permissions-are-no-longer-available.98100/). The only exception is for non-Google Play apps. Upvote 0
@JohnC is correct (https://www.b4x.com/android/forum/t...og-permissions-are-no-longer-available.98100/). The only exception is for non-Google Play apps.
moster67 Expert Licensed User Longtime User May 18, 2020 #5 While not being a "natural" solution, the B4AAccessibilityServices library could help.. Upvote 0
N Nishan15 New Member May 18, 2020 #6 Erel said: @JohnC is correct (https://www.b4x.com/android/forum/t...og-permissions-are-no-longer-available.98100/). The only exception is for non-Google Play apps. Click to expand... Thank you for your time.. I am not going to publish the app, it’s for personal use. I will try B4A Accessibility Service lib and check Upvote 0
Erel said: @JohnC is correct (https://www.b4x.com/android/forum/t...og-permissions-are-no-longer-available.98100/). The only exception is for non-Google Play apps. Click to expand... Thank you for your time.. I am not going to publish the app, it’s for personal use. I will try B4A Accessibility Service lib and check
Erel B4X founder Staff member Licensed User Longtime User May 18, 2020 #7 If it is not a Google Play app then you can use PhoneSms.Send. Just request the permission at runtime. Upvote 0
If it is not a Google Play app then you can use PhoneSms.Send. Just request the permission at runtime.