RSS Search

News  Feeds  Tags  Search Shortcuts

FeedsFarm.com > Working with Mobile Phone SMS (text) messages using the .NET Compact Framework 2.0 and Windows Mobile 5

Working with Mobile Phone SMS (text) messages using the .NET Compact Framework 2.0 and Windows Mobile 5

18th Nov 2005, 13:39 GMT

I'm a mad one for the text messages. You know -- the SMS, the BEEP! BEEP! -rumblerumblerumble-, the "Dude I'm at the pub where are you guys?!" furiously hammered into the mobile. "Texts" are indeed the most expensive 160-byte chunks I send on a regular basis. And it seems that I'm a little disturbingly quick with the aul stylus and the PocketPC, which has led to some gentle ribbing in the aforementioned pub -- probably well deserved. But then there's the kids with their "OMG UR SO MeNTaL" and their "LOL I pwn3d rob h3 h4s n0 m4d sk1LLz on the txt!!!!1!11" and, most lamentably, their "w00t!" warcries whizzing through the air. It's a grammatical low to which Autocomplete and I refuse to stoop (although Autocomplete has hobbled along learning words like "squiffy," "knackered," "hosehead," "nuzzle," "improbably," and, improbably, "Autocomplete.") Not to mention half the "words" in the first paragraph. But there's a point to this post, and I'm just getting around to it now: How do you intercept and handle text messages using the .NET Compact Framework 2.0? The answer? Pretty easily. Here's how . This is an excerpt from Dave Glover's article, which I've linked just above: Windows Mobile 5.0 and the Compact Framework V2 introduce a neat and simple concept that allows you to easily intercept an SMS message and do some processing on it effectively enabling you to use SMS as an underlying transport for your applications - be it a game or some line of business app. You can tell the SMS Interceptor to look out for specific message types by specifying a message signatures and then just structuring the SMS message body with the data you want to ship around, pretty darn cool and simple. And this is a code snippet that will receive a text in the emulator: using (ol = new OutlookSession()) { SmsMessage testMessage = new SmsMessage(); testMessage.To.Add(new Recipient("+14250010001")); //Using the '?' character as the message signature testMessage.Body = string.Format("?{0}", messageToSend); ol.SmsAccount.Send(testMessage); } Cool!!!!1!111!11one

View full story at blogs.msdn.com

Working with Mobile Phone SMS (text) messages using the .NET Compact Framework 2.0 and Windows Mobile 5 related news:

Latest news from Robert Burke's Weblog: