[API] Simple API to send messages to/from PC via Android and get contacts.

GeekyScott

Member
Jan 18, 2012
18
126
0
Edinburgh
www.geekyscott.com
SMS2PC API

Introduction

It is with great pleasure that today I am releasing the first public beta of SMS2PC API which is designed to allow developers and hackers to quickly and easily send and receive messages via an Android (and soon to be BlackBerry and WinPhone) device as well as loading contact information and address credentials.

The API is designed in an async like manner allowing you to create a request, forget about it and then easily handle any return to the original request while not having to worry about threads, connections and protocol management. As an example, you can send a message with only a few lines of code and then handle delivery notifications and send notifications when they occur by providing a callback that is fired when a the message's status has changed.

You are free to use the API as you wish. You will be able to do things like send messages from a server to notify of events on the server, you could make an application than can receive commands such as ‘shutdown_pc’ via SMS and then shut down the current PC, run in on embedded systems, create alarm system that notify via SMS of intruder etc!

Features

Current

  • Send message
  • Handle Delivery Notifications
  • Handle Send Notifications
  • Load Contact Details
  • Receive incoming message from device.
  • Loading message list for a contact

Upcoming

  • MMS Support
  • Inbox Support
  • Load advanced contact details

Example of Handling Incoming Messages

As an example to highlight how simple it is to receive new messages when the arrive on device the actual code used is provided below.

Code:
class MyHandler implements IMessageReceiveHandler
{
	@Override
	public void messageReceived(Message message)
	{
		System.out.println("New message received: " + message.getBody());
	}
}


// Create instance of your handler and provide it to the API
MyHandler myMessageHandler = new MyHandler();
sms2pc.setMessageReceiveHandler(myMessageHandler);
Requirements

Current the API is Java based (requiring JRE). We have nearly finished the C# version and the mobile apps for BlackBerry and WinPhone will be available shortly.

Terms of Use

Please be aware that although you are totally free to use the API in any software as you choose (commerial or personal) , the Android/BlackBerry & WinPhone app is currently paid for at around £1.99. Also, if you use SMS2PC API in your software you must provide a mention of this fact in your about/info dialog or help if console application. This may be updated in the future although the price will never increase. If you are an XDA user you can download SMS2PC API for free for Android but must not re-distribute the apk.

Conclusion

Thank you for reading. If you have any questions feel free to email me at [email protected] or PM me.
 
Last edited:

arrjaytea

Senior Member
Dec 7, 2010
242
47
0
lastminutedisco.net
Any chance you plan on fixing the desktop app to work with Lion or Mountain Lion?

It's only $3, but you've got it (literally tried to refund moments later and couldn't), and the app flat out does not work on Mac OSX.