Page 1 of 1
Sending SMS messages from phone
Posted: Mon Mar 30, 2015 9:27 pm
by RichardL
Hi,
A bit of an odd one... but I thought I would ask just in case...
I have written a database program for managing some aspects of a club. It stores member info including mobile phone contact numbers.
The question came up "Could you send a notice to everyone saying 'Saturday evening meeting now at pub?"
Has anyone tried to get an Android phone to send an SMS message?
I'm assuming a USB - USB link between the phone (a Nexus 4 - Android) and the PC running my database.
My service providers gives me 2000 emails a month and I doubt that I ever use four, so I might as well!
RichardL
Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 12:09 am
by Shield
Just create a simple Android App (which is dead easy to do, it's like two lines of code to send an SMS)
that listens on a network port. Send TCP messages to that port with the required information (text, receiver, authentication)
and let the App do the rest.

Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 4:46 am
by netmaestro
If you know the carriers of your recipients, you can create a list and send the texts from Purebasic as long as your smtp server doesn't require ssl:
Code: Select all
;
; ------------------------------------------------------------
;
; PureBasic - Mail example file
;
; (c) Fantaisie Software
;
; ------------------------------------------------------------
;
InitNetwork()
If CreateMail(0, "me@myisp.com", "Hello !")
SetMailBody(0, "Hi There!")
; Change the recipients to real one
;
AddMailRecipient(0, "<number>@<sms gateway>", #PB_Mail_To)
; Set the SMTP server to use
;
Result = SendMail(0, "<smtp server>", port, 1, "<username>", "<password>")
Repeat
Progress = MailProgress(0)
Delay(300)
Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
If Progress = #PB_Mail_Finished
MessageRequester("Information", "Mail correctly sent !")
Else
MessageRequester("Error", "Can't sent the mail !")
EndIf
EndIf
You can find many comprehensive lists of sms gateways for every carrier in every country on the web. Match them up with the phone numbers you have (you may have to ask your recipients who their carrier is but
http://www.freecarrierlookup.com/ is very good) and fire away.
Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 7:33 am
by infratec
Or use a simple GPRS-USB-Stick.
It appears as a serial com port and you need only a few AT commands to send a SMS.
Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 9:00 am
by ostapas
If you still decide to use your phone, there is online drag and drop Android apps builder:
http://ai2.appinventor.mit.edu/
Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 3:50 pm
by TI-994A
RichardL wrote:Has anyone tried to get an Android phone to send an SMS message?
...
My service providers gives me 2000 emails a month...
Hi Richard. I'm assuming you meant
2000 SMS's a month.
Instead of tethering the mobile phone to the PC, the simplest approach would be to utilise a SOAP or REST web service. You'd need a server for this, but you could also use WAMPP or XAMPP on your PC. The Android app would send a request to the web service, which would in turn query the database and return the list of mobile phone numbers.
Re: Sending SMS messages from phone
Posted: Tue Mar 31, 2015 7:44 pm
by Nico
Another solution, use PushBullet service, there is a app for android and iphone for free. You create a channel and user suscribe it, just a single send and all users receive notification. See API in the Website.
Re: Sending SMS messages from phone
Posted: Wed Apr 01, 2015 12:06 am
by IdeasVacuum
Actually netmaestro, the UK and some other European suppliers do not support the service for use by consumers. If you are a big company sending spam, that's OK..........
Richard, take a look at SpiderBasic. You could simply have your app on your phone.
Re: Sending SMS messages from phone
Posted: Tue Apr 07, 2015 8:45 am
by RichardL
Hi Guys,
Sorry for not replying earlier, grandfather duties and needing to assist with getting some pipes and cables installed has kept me away from the computer.
Thanks for all the responses, lots of food for thought. My options are limited by several things:
1. The gymnasts are mostly young school children and trying to get them to supply mum and dad's phone service provider would take a long, long time!
2. Their club would probably not want to afford a monthly contract bill for a service supplier and a GPRS USB stick. Maybe I can find a pay-as-you-go service, then it's only a one off cost to buy the stick. I like this approach 'cos it is easy to code.
3. An online service might be OK for the real emergency (snowed off, flood etc). I wrote a program years ago to send SMS messages to a service provider and then on to service engineers and that worked quite well. The cost now would be around 2 to 4 pence a message multiplied by between 200 and 300 each shot. OK for emergencies but not for regular 'reminders'.
I'm going to put this on the back burner until next month when I should have some spare time.
Thanks again for your suggestions.
Richard L