Share via


Implementing the Notification UI

The notification UI communicates notification events to a user and handles these events. The notification UI primarily handles timer events because when the system triggers a system event notification, it creates a time-based notification with the expiration set to the current time. To implement your notification UI, you can base it on one of the following components:

  • Notifmin, which handles notifications on devices with no UI. Essentially, this component launches other applications upon event or timer notification when the elements provided by a UI are not available. This component is available in the Gateway and Digital Media Receiver configurations. The source code for this component is in %_WINCEROOT%\Public\Common\Oak\NotifyM.
  • Notifpub, which handles notifications on devices that are capable of presenting a UI. This component can present a dialog box, flash a light, start a vibrating mechanism, or use any other method of notification that is available on the device. To enable these features, modify this component and insert calls to hardware-dependent device drivers. This component is available in the Smart Phone, Mobile Handheld, Enterprise Web Pad, Internet Appliance, Enterprise Terminal, Windows Thin Client, Media Appliance, and Set-Top Box configurations. The source code for this component is in %_WINCEROOT%\Public\Common\Oak\Notify.

Once you have chosen a suitable component for your notification UI, you must modify this component so that it interfaces properly with the hardware requirements of the target device.

To allow the base notification engine to communicate with your notification UI, your notification UI must expose several functions. The following table shows these functions.

Function Description
CeNotifyPublic_Initialize Initializes the notification subsystem. This function is called once at startup.
CeNotifyPublic_DisposeOfPacket Removes a packet once it has expired, has been handled, or has been removed programmatically.
CeNotifyPublic_NewPacket Creates UI features or launches an application for a new packet when a notification becomes active.
CeNotifyPublic_PresentSettingsBox Allows a user to set notification preferences.
CeNotifyPublic_UserAlarmSignalled Signals an auxiliary timer that is set by CeNotifyPrivate_SetUserAlarm. This function is for use with a progressive alarm.
CeNotifyPublic_FilterUserNotification Validates a user notification with existing hardware. For example, notification by vibration is not valid if the device is not equipped with a vibrating mechanism.
CeNotifyPublic_FilterEvent Validates a system event with existing hardware. For example, power-on notification is not valid if the current power driver does not generate this event.
CeNotifyPublic_UIWndProc Defines a window procedure for a hidden UI window.

To allow users to set notification options, the base notification engine can call your notification UI with the CeNotifyPublic_PresentSettingsBox function. Your notification UI should respond to this function call by launching a dialog box that presents a user with all of the notification options that are available on the device. These options must correspond with the hardware capabilities of the target device.

The base notification engine validates both timer and system events against the hardware that is installed on the device. For timer events, it uses the CeNotifyPublic_FilterUserNotification function. For system events, it uses the CeNotifyPublic_FilterEvent function. If an application registers for events or event responses that are not available on the device, these functions should return FALSE.

For an example of how to start a notification UI, see the CeNotifyPublic_NewPacket function in %_WINCEROOT%\Public\Common\Oak\Notify\Notifext.Cxx.

See Also

Implementing Notifications

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.