Android Question B4A App as SMS-Messenger + API

DaOel

Member
Licensed User
Longtime User
I receive requests from users of my app, that the old SMS Reminder Function in my older apps were a great tool.
Thats why I tried to create an app that fullfills all criteria for an SMS Messenger. Finally I ended up Google not allowing it in the Play Store. (Main Purpose is different from sending SMS, they say)

I wonder if someone in the community could create an B4A App as a Gateway / API. I would then use the API in my app and tell my users to also install the B4A SMS-API App. Does that make sense?
Is there a chance for such an app? Or will everyone fail uploading it to the google play store?

I dont want to use third party SMS Gateways ... I would rather prefer if my users send their SMS with their own number from their smartphone.
Ofc they can not use the default SMS Messenger anylonger.
 

DarkoT

Active Member
Licensed User
Od uporabnikov svoje aplikacije prejemam zahteve, da je bila stara funkcija opomnikov SMS v mojih starejših aplikacijah odlično orodje.
Zato sem poskušal ustvariti aplikacijo, ki izpolnjuje vse kriterije za SMS Messenger. Končno sem končal tako, da ga Google ni dovolil v Trgovini Play. (Glavni namen se razlikuje od pošiljanja SMS-ov, pravijo)

Zanima me, ali bi lahko nekdo v skupnosti ustvaril aplikacijo B4A kot prehod/API. Nato bi uporabil API v svoji aplikaciji in svojim uporabnikom povedal, naj namestijo tudi aplikacijo B4A SMS-API. Je to smiselno?
Ali obstaja možnost za takšno aplikacijo? Ali pa ga vsem ne bo uspelo naložiti v trgovino google play?

Ne želim uporabljati prehodov za SMS tretjih oseb ... raje bi imel, če moji uporabniki pošljejo SMS s svojo številko s svojega pametnega telefona.
Včasih ne morejo več uporabljati privzetega SMS Messengerja.
I'm not sure if I understood the idea correctly. Are you looking for an online service with an API where SMS messages can arrive, or through which you can send SMS messages? Perhaps I don't fully grasp the question... There are indeed a series of services online that function as APIs for sending SMS, but they are usually paid.
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
No. I want to send an SMS from the smartphone. But I dont want to implement the logic to do this, instead I want someone else to implement it. I only call an API (which is most likely http based to localhost)
All the work for an SMS Gateway APP (implementing it with a nice User-Interface, fullfill google requirements, publish it on Google Play) is done by an B4A expert.
 
Upvote 0

DarkoT

Active Member
Licensed User
No. I want to send an SMS from the smartphone. But I dont want to implement the logic to do this, instead I want someone else to implement it. I only call an API (which is most likely http based to localhost)
All the work for an SMS Gateway APP (implementing it with a nice User-Interface, fullfill google requirements, publish it on Google Play) is done by an B4A expert.
I don't know if I still understand it correctly. I have actually done a similar thing before (using the B4J desktop app, but the same logic would apply if it were a B4A app) that connects to a web SMS sending service via API. In essence, it's very simple... I created a form where the user has a button 'Send SMS'; in the background, the message is composed and sent to the API service of a local (home-based - in my case, Slovenian) SMS provider. Perhaps this could be a solution...

Code example is here:

Code:
Private Sub btnSend_Click
    Dim j As HttpJob
    j.Initialize("",Me)

    For x = 1 To 100
        pbarProgress.Value = 100 - x
        Sleep(10)
    Next
 
    Dim Link As String
    Dim LinkParams As String
    Link = "http://www.smsapi.si/poslji-sms?"
    LinkParams = $"un=xxxxxxxxx&ps=x442fa6342exa7c6323223b6v74b6dc3c87cd2fb27&from=031888888&to=${txtSMSNumber.Text}&m=${txtMsg.Text}&cc=386"$

    j.Postbytes(Link, LinkParams.GetBytes("utf-8") )
    Wait For (j) JobDone(j As HttpJob)

    If j.Success=True Then
        ' Log(j.GetString)
        retNumber = j.GetString.SubString2(j.Getstring.LastIndexOf("#") + 1, j.GetString.Length)
    Else
        'do something'
        DbComm.InsertErrorLog(ModulName, j.ErrorMessage, 1, B4XPages.MainPage.CurrentUser)
        Log(j.ErrorMessage)
        j.Release
    End If
    
    msgSend = True
    ' zapremo masko
    Maska.Close
    
End Sub
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
Hey DarkoT,
This looks like simple and nice code.
One Question:
you entered '031888888' as 'from' attribute.
What happens if recipient responds to SMS? Will the Response be send to Phone with Number '031888888' ?
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
Allthough it looks like a good option, I regret prices for SMS via Gateway are too high. I created an app for driving teachers and they will not pay 10 EUR a month just for reminding their students for the upcoming lessons. Pricing for SMS is as high as 7.5 cent each SMS in Germany. :eek:
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Finally I ended up Google not allowing it in the Play Store. (Main Purpose is different from sending SMS, they say)
What I wonder is whether you have complied with Android's privacy rule to request clear consent to send a text message with a clear indication of the purpose of that text message, for example by stating what your app wants to send per text message versus it was send without any intervention of the user.
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
The Purpose of the SMS is a reminder. It needs to be confirmed 2 times before the reminder gets activated.
I think google simply does not want this. 3rd Party gateways like smsapi is simply the way to go. (If you are willing to pay 10 cent per SMS)

I now try an Email Approach instead:
 
Upvote 0
Top