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
Working with Mobile Phone SMS (text) messages using the .NET Compact Framework 2.0 and Windows Mobile 5 related news:
- Working with Mobile Phone SMS (text) messages using the .NET Compact Framework 2.0 and Windows Mobile 5 — Robert Burke's Weblog
- MSDN Webcast: Developing Multithreaded Applications with the .NET Compact Framework 2.0 — MSDN Just Published
- Indian Women unite against Muslim divorce by SMS — textually.org
- Fremde Welten mit dem Compact Framework 2.0 (Teil 5-6) — Mobile Development
- 'Literary' texts no more? — LISNews.org
- Shakespeare's new avatar: 2b? Nt2b? = ??? — Expressindia
- 2B? Nt2b? Shakespeare Gets Texting Treatment — wnbc.com - Technology
- China has 383 million mobile phone subscribers — Telecompaper Headlines
- integrating flash with .net compact framework 1.0 — Channel 9
- Picking up on trends in mobile phone usage — The Irish Times' Finance Top Stories
Latest news from Robert Burke's Weblog:
- Cork, Dublin Events: Visual Studio Tools for Office with team member Donald Drake
- Windows Vista Availability for MSDN Subscribers: Friday November 17th. (Office 2007 available now)
- Cork, Dublin, Belfast Events: Visual Studio Tools for Office with team member Donald Drake
- NLarge is now a CodePlex community project
- Fun with Photosynth's Autoplay - what a screensaver that would make!
- Microsoft Press Pass on reliability features in Windows Vista - and my teeny little contribution