views:

35

answers:

3

I am creating a windows application which needs to send some sms to mobile phone.This is just for testing purpose. Now can I use my cell phone to get this done. I have android phone which can be connected to pc using USB.

Application is created in C++, windows api.

Any pointers will help

+1  A: 

You have 3 choices, really.

1) Find an SMS gateway service (there are plenty around, but they don't tend to be that cheap)
or
2) Dig into the APIs for the android phone, and see if it is possible to programatically send a text from a USB connected phone/pc pair
or
3) Get a windows mobile device and write a native app that will handle the sending for you, then push the data you wish to send to the device by ActiveSync. In C#, you can do this in about 3 lines of code.

If I needed to send SMS messages, I'd go down route 3, but that's just me. With options 2 and 3, you'd want to make sure your price plan includes unlimited texts, and that the contract doesn't specifically disallow this kind of messaging use.

ZombieSheep
+1  A: 

The easiest way is by sending a typical mobile phone the AT-CMGS command. Details at http://www.developershome.com/sms/sendSmsByAtCommands.asp

MSalters
+1  A: 

You can write a simple android application that runs in the background that checks for text files. When you want to send an SMS just push a new text file with the phone number and the message onto the sd card. You can use the android SDK 'adb push' command for that. It's a hacky way tho, wouldn't recommend it unless it's just for basic testing

Another option is using an online gateway such as Twilio. It's super easy to set up and allows you to easily send messages through a easy to use HTTP api. You can use CURL to connect to a HTTP site through C++.

Chaoz