Rory Does Windows Mobile Development - WM 5.0 Notification API

Play Rory Does Windows Mobile Development - WM 5.0 Notification API
Sign in to queue


In this screencast, I demo one of the new Windows Mobile 5.0 features.

SNAPI, which is an awesome name for an API, is the State Notification API. It allows you to keep track of various aspects of your device. From the number of available network connections to the presence of a keyboard, SNAPI can tell you what's up.

Additionally, SNAPI can be used to monitor these system attributes and notify you upon a change. So, for example, if someone in the field who was previously out of range suddenly came within range of a network of some sort, SNAPI can let you know.

It's neat.

As always, you can read about my day job here, or visit my blog here.

Screencasts In This Series:

An Introduction To Windows Mobile Development

- Building a Simple Web Browser With the .NET CF 2.0

- A Simple Data Driven Windows Mobile App Using SQL Server Mobile

- Data Synching: Part One

- Data Synching: Part Two

- Windows Mobile 5.0: State Notification API

- Windows Mobile 5.0: Pocket Outlook Object Model

- Windows Mobile 5.0: Camera API



Download this episode

The Discussion

  • User profile image


    Another great webcast, thanks!

    Is there a way to install a service onto a Windows Mobile 5.0 device? It seems that the SNAPI would really shine as a service to notify, or run, other applications when certain events occur. I am working on an app that, on sync, needs to get a file from the local computer, that gets manipulated, then sent back once work is complete. If I could run a service that responded to the ActiveSync, or Cradled, states, I could start the app to transfer files, or do it directly from the service.

    Any thoughts?

    Thanks in advance.

    btw, when are you coming back to Somerville? We are working on the streets to make them more sensible for out of towners. [6]

  • User profile image


    I am trying to use the MessagingMmsUnread Windows Mobile API (under SNAPI) in the following line:

    MMScount.Text = SystemState.GetValue(SystemProperty.MessagingMmsUnread).ToString();

    The application is generating an error on a WM 5.0 device with NETCF 2.0 installed.

    Doing some research on MSDN and other places online, I found very few uses of or references to this particular MMS API.

    Does it actually work? How can I make it work?

    I'd appreciate any pointers in the right direction.


  • User profile image
    What is the error you are seeing with the MessagingMmsUnread property?

    btw, another way to get the value is to use: SystemState.MessagingMmsUnread

    all of the properties can be accessed through static properties on the SystemState object.  The main difference between using the static property and GetValue is that the static properties are usually strongly typed (where GetValue returns 'object'). 

    great screen cast!
  • User profile image
    Hi btshil,
    Have you got the unread number of MMS successfully?
    I came into the same problem recently, I cann't get MMS's unread numbers, I donn't know why? Please help me!

    Thank you in advance!
  • User profile image
    Dox Doigts

    I'm not able to see the videos.
    How can I view them please?

Add Your 2 Cents