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
Sending SMS messages from phone
Re: Sending SMS messages from phone
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.
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.
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
- netmaestro
- PureBasic Bullfrog
- Posts: 8433
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Sending SMS messages from phone
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:
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.
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
BERESHEIT
Re: Sending SMS messages from phone
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.
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
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
Hi Richard. I'm assuming you meant 2000 SMS's a month.RichardL wrote:Has anyone tried to get an Android phone to send an SMS message?
...
My service providers gives me 2000 emails 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.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel
Re: Sending SMS messages from phone
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.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Sending SMS messages from phone
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.
Richard, take a look at SpiderBasic. You could simply have your app on your phone.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Sending SMS messages from phone
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
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