Share My Creation Send SMS from anywhere using B4A ! [Free source included !]

Hi there!
I want to show you how to send SMS for free from anywhere (Server, B4J, B4A, B4I, Python, JS, etc.) just by using a POST request, MySQL, PHP, and B4A!

Steps to use:​

  1. You need to have a web server (shared or private is fine). To create a free one, use 000webhost.
  2. Once you have access to your server, upload the contents of PHP_Server.zip to your server.
  3. Create a MySQL database using the contents of the MYSQL.zip file.
  4. Save the database credentials and enter them into the config.php file on the server.
  5. Test the database connection by navigating to the GetFiles.php link (for example: https://your-server.com/SMSSender/config.php).
  6. Open the B4A project.
  7. Update the "link to GetList.php" and "link to sms_sent.php" in the HTTP background service.
  8. Compile the project and grant the "Send SMS" permission on your phone.
  9. Done!
To send an SMS, you just need to make a POST request to the send_sms.php link (see attached image).
If you encounter any problems, contact me via private chat.
Enjoy!

image.png
 

Attachments

  • PHP_Server.zip
    2 KB · Views: 227
  • MYSQL.zip
    591 bytes · Views: 218
  • B4A_project.zip
    9.3 KB · Views: 261

JohnC

Expert
Licensed User
Longtime User
The actual sending of the SMS needs to use some cloud service other than our "web server" - meaning your code/our website needs to connect to a third-party service that is owned by another company that interfaces with the various cellular companies to submit the sms message to.

But in doing a quick review of your code, it appears your code works with a local database, but I could not see where is calls an external cloud service to send the actual SMS message.

What third-party cloud service does your code use?
 

Justcooldev

Member
Licensed User
No third-pary cloud service. Just Mysql database.
My app is checking every 1 minutes if there is new message to send in background
 

JohnC

Expert
Licensed User
Longtime User
Oh, so your phone is doing the actual sending of the SMS, and the B4A app is acting like a background server checking your website database to see if there are any messages waiting to be sent, and if so, send them from the phone itself.
 

tsteward

Well-Known Member
Licensed User
Longtime User
Interested in your app. I get Message failed to send.
url formatter like this?
myserver.com/sms_server/send_sms.php?Desti=0425346###&Message_TEXT=Hello%20There
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
yes, it is working exactly like this.
You will not have to pay an api.
I can't speak to other countries, but you should know that in the U.S. even though the carriers advertise "unlimited texts" there is actually a federally imposed limit on the number of texts non-commercial accounts can send per 24 hours.

So, if you wanted to use this method to send bulk texts to customers for example, you would probably be better off using a 3rd party such as Twilio.
 

tsteward

Well-Known Member
Licensed User
Longtime User
I can't speak to other countries, but you should know that in the U.S. even though the carriers advertise "unlimited texts" there is actually a federally imposed limit on the number of texts non-commercial accounts can send per 24 hours.

So, if you wanted to use this method to send bulk texts to customers for example, you would probably be better off using a 3rd party such as Twilio.
No not bulk sending. My app on my personal phone will sms customers when I'm on my way to them and another when the job is finished with a link to leave a review.
Using this approach I can still use my phone but customer will receive sms from works mobile which means they don't get my personal number. Not sure I'll continue to use it but been an interesting learning experience.
 

amir hosein

Member
Hello .
I am looking for a way to forward SMS (text) on my phone to another program or ... , that i can get it in another country .
I think your solution maybe help me to do this . Please help me to create mysql database in the site 000webhost.
I have created an account on this site and uploaded you php files and mysql structure file ,but i didn't know how to make it .
can you help me ?

best regards
 

Justcooldev

Member
Licensed User
Hello .
I am looking for a way to forward SMS (text) on my phone to another program or ... , that i can get it in another country .
I think your solution maybe help me to do this . Please help me to create mysql database in the site 000webhost.
I have created an account on this site and uploaded you php files and mysql structure file ,but i didn't know how to make it .
can you help me ?

best regards
Hi,
Sorry for the late reply. Yes I can help.
Please make a new thread or easier : to forward sms you can use a tool like MightyText (very powerfull !).
best regards
 

amir hosein

Member
Hello
I need an android app to install on my old Tablet that has android 4.2.2. to forward SMS(text) to an email
Is this app (MightyText ) for android 4.2.2.+ ?

Thanks for your answer
 

amir hosein

Member
Hello justcooldev
I didn't find Mighty Text on google play store . Can you send me the link of download ?
I want to test it .

Thanks
Regards
 
Top