DeviceNotificationHandler

The DeviceNotificationHandler element specifies a device notification handler. A device notification handler allows you to run code in response to events, such as mobile network operator administrative SMS or USSD notifications, even if the Windows Store app is not running. For more information about implementing a notification handler, see the Mobile Operator Notifications white paper.

Usage

<DeviceNotificationHandler EventID=”xs:string” EventAsset=”xs:string”/>

Attributes

Attribute Type Required Description

EventID

xs:string

Yes

The event ID for the device notification handler.

EventAsset

xs:string

Yes

The event asset for the device notification handler.

Child elements

There are no child elements.

Parent elements

Element Description

DeviceNotificationHandlers

Specifies the device notification handlers.

XSD

<xs:element name="DeviceNotificationHandler" type="tns:DeviceNotificationHandlerType" maxOccurs="unbounded" />

<xs:complexType name="DeviceNotificationHandlerType">
  <xs:attribute name="EventID" type="xs:string" use="required"/>
  <xs:attribute name="EventAsset" type="xs:string" use="required"/>
</xs:complexType>

Remarks

  • When you specify the DeviceNotificationHandler in the Application element, the system calls the event handler and invokes the event when the device changes to the state.

  • The EventID attribute is the SMSEventHandler for the SMS device case.

  • The EventAsset attribute is the same value that you specify in the app manifest as an extension of Windows.BackgroundTasks.

The DeviceNotificationHandler element is optional.

Send comments about this topic to Microsoft