Push notifications in native Windows 8 applications

improve this page | report issue


IBM MobileFirst Platform Foundation provides a unified set of API methods to send, or push, notifications to devices where the MobileFirst application is installed. It is possible to send notification in 3 distinct types: event source notification, broadcast notification, or tag-based notification.

This tutorial explains the concept, API, and usage of push notifications in the context of Native Windows 8 applications.
To create and configure a Windows 8 native project, first follow these tutorials:

The following topics are covered:

Setting up push notification

Server side

In the application-descriptor.xml file, for windows8, set the following attributes to the pushSender element.

packageSID - Unique identifier of your Windows Store app

clientSecret - Secret key

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<nativeWindows8App xmlns="http://www.worklight.com/native-windows8-descriptor" id="Windows8NativePush" platformVersion="" securityTest="MySecurityTest" version="1.0">
    <pushSender clientSecret="WNS_SECRET_KEY" packageSID="WNS_UNIQUE_IDENTIFIER"/>

Client side

Set the Identity Name and Publisher values manually in the package manifest or associate your native project with the application in the Windows Store by right-clicking the project and selecting Store->Associate App with the Store.

If you want your app to support toast notification, add the ToastCapable="true" attribute to the VisualElements element in the package manifest.

    <Application Id="App" ....>
        <VisualElements  .. ... ToastCapable="true">

For more information about setting up your native Windows 8 application for push notification, see the topic about "Setting up push notifications for Windows 8" in the user documentation.

Notification types

Event source notification

Event source notifications are notification messages that are targeted to devices with a user subscription.

Broadcast notification

Broadcast notifications are notification messages that are targeted to all subscribed devices.

Tag-based notification

Tag-based notifications are notification messages that are targeted to all the devices that are subscribed to a particular tag.

For more information, select a notification type.

Select a notification type

Last modified on November 09, 2016