Small change to SMS interception


Until a question in the smartphone.developer newsgroup brought it up, I had forgotten about a small but significant change we made to SMS interception on Windows Mobile 5.0. 


In the past, SMS interception has worked by creating a DLL and then adding a reference to it under HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules.  For Windows Mobile to become aware of things being added/removed from this registry location, you had to soft-reset the device.  Ouch.


So one of the subtle changes we made in Windows Mobile 5.0 is that you no longer need to do that soft-reset.


This was changed primarily so we could keep the new managed APIs for SMS Interception (Microsoft.WindowsMobile.PocketOutlook.MessageInterception) and the State & Notification Broker (Microsoft.WindowsMobile.Status) as similar as possible.  Specifically, we wanted both APIs to support volatile notifications which are set up at runtime, fire only while the app is running, and stop once it closes.  But it’s obviously a nice improvement for people using the native SMS interception APIs as well.


By the way, if you need to do managed SMS interception and can’t wait for Windows Mobile 5.0 devices to start shipping, there’s a good whitepaper on MSDN that will help you out.


-Robert


Comments (17)

  1. Magne Roald says:

    On Windows Mobile 2003 you don’t need to softreset the device, it is enough to close down the messaging application and start it again:

    1. Close messaging app: "Inbox.MainWnd" window class

    2. Wait until it is closed

    3. Do the registry stuff for the DLL

    4. Start messaging to register the changes (tmail.exe in windows catalog)

    5. Close or hide messaging app.

    The SMS iterception does now work without a reset. Stil, this is a bit annoying.

    As I understand the message above, only step 3 is neccesary on Window Mobile 5.0?

  2. Riki says:

    I just kill tmail.exe when installing sms rules in 2k3, like Magne.

    riki

  3. flyingbugs says:

    Riki, I just do the same thing exact as you^_^.

    It works perfect.

  4. Eric says:

    I got a problem in i-mate JASJAR.

    I create a subfolder, for example, "temp", under Inbox of Text Messages. Put some messages into it. Then soft reset my device.

    Oops! No folder named "temp" exists! All message in this folder is gone!

    Anyone can tell me why? Thanks!

  5. Will says:

    Eric,

    The problem you encountered is caused by the mechanism of the DB flush. System will not save the data to the database immediately after the operations. Maybe some time later, or … I’m not sure.

    Will

  6. How can I intercept SMS Class 0 messages on a Windows Mobile 5 device?

    I’ve registered a MessageInterceptor that works well for normal SMS messages.  But SMS class 0 messages are not intercepted — they are just displayed in the UI.

    Any help would be appreciated!

    Andy

  7. Alex Filatov says:

    What does SMS interception for?

  8. Tom Gunthorpe says:

    Hello all,

    I’m adding sms interception into an existing wm5 application. I have found several vb.net examples, however with each one the compiler reports an error with MessageInterceptor as …

    Error 1 Reference required to assembly ‘Microsoft.WindowsMobile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ containing the implemented interface ‘Microsoft.WindowsMobile.IApplicationLauncher’. Add one to your project.

    Being relatively new to vb.net, I’m not quite sure what it is really asking to add to my project and where.

    any help would be appreciated.

    Tom

  9. tommy says:

    Hi All,

    I just wanna make sure whether you’re topics is related with WM2003 on XDA IIS which often send a message more than one…

    I am on that problem, and somebody can help me???

  10. Ken says:

    I have a windows mobile 5 phone, and I’ve running a test sms interception app (.Net 2 using the sms interception class). When I send a message to the phone, from the phone, the interception works as expected. However, when the message is sent to the phone from elsewhere, the message just shows up in the inbox. Would you have any idea what I’m missing?

  11. Alessio says:

    Hello, I’m quite desperated…  I have a Gigabyte GSMART MS800. I loose every SMS/MMS sent to me when the phone is off… When I turn on the phone, I don’t receive the messages!! No problems when the phone is on. I’ve made a lot of tests, I’ve also upgraded the firmware to the last version available, with no success.  Please help me, I’m in trouble with my biz!! Thanks a lot. Alessio

  12. Manan says:

    Hi ,

    I am using windows mobile 6  on htc 3600, all of a sudden , strange thing has happened , whenever i send an email , my tmail.exe starts consuming 100% of cpu.

    Phone is halted , then have to restart .

    Any workaround ?

  13. Jeff Fisher says:

    I am also having this issue (just started) where tmail.exe starts consuming 100% of the CPU.  Windows Mobile 6.1 on a Moto Q

    Manan-

    Did you every find a workaround for this?

    jeff.fisher@gmail.com

  14. Bob says:

    Is there any way to prevent the screen from powering-on when an SMS is received?  All of my other intercept features are working great, and I power the screen off once I get the message, but it looks like the (otherwise sleeping) device is "flashing on".  Thanks!

  15. Bob says:

    IRT to the CPU at 100%, you should check the registry to see what is loading as part of the mail inbox rule.  You can confirm that it’s actually loading when you receive a msg by looking in the Remote Process Viewer by highlighting tmail.exe in the Process window, then look at what modules are loaded.  You can also use the RPV to kill the TMail process to confirm that’s what’s really eating up your cpu.

  16. Bob says:

    IRT to the CPU at 100%, you should check the registry to see what is loading as part of the mail inbox rule.  You can confirm that it’s actually loading when you receive a msg by looking in the Remote Process Viewer.  Highlight tmail.exe in the Process window, then look at what modules are loaded.  You can also use the RPV to kill the TMail process to confirm that’s what’s really eating up your cpu.  It’s a start…