Push notifications in native Windows 8 applications

improve this page | report issue

Overview

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="7.0.0.00.20150227-0916" securityTest="MySecurityTest" version="1.0">
    <displayName>Windows8NativePush</displayName>
    <description>Windows8NativePush</description>
    <pushSender clientSecret="WNS_SECRET_KEY" packageSID="WNS_UNIQUE_IDENTIFIER"/>
</nativeWindows8App>

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.

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

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