Sending SMS messages from phone

Just starting out? Need help? Post your questions and find answers here.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Sending SMS messages from phone

Post 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
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Sending SMS messages from phone

Post 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. :)
Image
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
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Sending SMS messages from phone

Post 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.
BERESHEIT
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Sending SMS messages from phone

Post 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.
User avatar
ostapas
Enthusiast
Enthusiast
Posts: 192
Joined: Thu Feb 18, 2010 11:10 pm

Re: Sending SMS messages from phone

Post by ostapas »

If you still decide to use your phone, there is online drag and drop Android apps builder: http://ai2.appinventor.mit.edu/
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Sending SMS messages from phone

Post 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. :wink:

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 :D
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Re: Sending SMS messages from phone

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Sending SMS messages from phone

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Sending SMS messages from phone

Post 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
Post Reply