Thursday, April 24, 2008

I've been on a bit of a mission for the past few days.    A friend of mine asked how easy it would be to build a system that accepted text messages and was able to respond back to the sender.   So I got thinking,   radio stations and TV do this all the time.   Text "VOTE BOB",  to 83232332 to evict Bob from the Big Brother House.    Or nightclubs let you text the DJ for what to play next.     So how could you build a simple desktop application that could process and respond to text messages?     I'm going to take the next few posts to cover a solution to this problem.

I'm sure, you can see where this all going; doing windows mobile line of business we have all the pieces.    Firstly using SMS message interception,  we are able to capture any incoming text message and process it ourselves.    So first job was to build a Windows Mobile Line Of Business application to listen to the incoming texts.   Here's one that I prepared earlier -

image

This application captures any incoming text message with the magic bit of Compact Framework code -

            interceptor = new MessageInterceptor();
            interceptor.InterceptionAction = InterceptionAction.NotifyAndDelete;
            interceptor.MessageReceived += new MessageInterceptorEventHandler(interceptor_MessageReceived);

Next step we need to pass the contents of any text message over to a desktop PC for processing.    Now I now this isn't truly in the spirit of mobile line of business, where we normally do everything on the device,  but at 2am in a crowded nightclub, its probably better to pass the messages over to a desktop PC for handling.   Of course their are many ways to achieve the Windows Mobile to desktop connectivity.  I opted in the end for raw TCP/IP socket programming, which lets me use the setup either over an ActiveSync/Windows Mobile Device Centre with a cable from the mobile device or  a wireless connection.    

Here's the desktop side of things,    listening for incoming messages.

image

Now its not pretty 'yet'  and I haven't got it displaying a bar graph or counting votes,  but the mechanism for collecting and responding to text messages is all in place.

So lets give it a run.    Now being frugal  I thought I'd save myself lots of cash and use the Windows Mobile 6 SDK, Cellular emulator to send fake text messages to my phone emulator.    So I've sent "Vote Bob", to my phone.       I get an text message response back to me, saying "Thank you for you're vote".   

 

image

The desktop application just for proof of concept also pops up each received text message, as follows -

image

More over the next few posts.  Send me a mail if you are interested in the complete source of this application.

Thursday, April 24, 2008 7:41:31 PM UTC  #    Comments [1]  | 
Friday, April 25, 2008 12:40:16 AM UTC
We have software that processes incoming and outbound text messages on any PC or Laptop that has an internet connection. In addition we can export the SMS and send it to a queue so that it may be displayed on any digital device, score boards, TV, movie screens, etc. In addition to capturing the cell number and the cell phone carrier and adding it into the contact list.
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: