Push notifications in native Windows Phone 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 a notification in 3 distinct types: event source notification, broadcast notification, and tag notification.

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

The following topics are covered:

Notification types

Even source notification

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

Broadcast notification

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

Tag-based notification

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

For more information, select a notification type.

Setting up the project

missing_alt

  1. Create a MobileFirst project.

    Add a MobileFirst Windows Phone 8 native API. The native API project provides the files that are necessary to build a Windows Phone 8 app.

  2. Edit the application-descriptor.xml file.

    Add the "pushSender" tag to the application-descriptor.xml file.

    <nativeWindowsPhone8App id="WindowsPhone8NativePush" platformVersion="6.3.0.00.20141111-0731" version="1.0" xmlns="http://www.worklight.com/native-windowsphone8-descriptor" securityTest="MySecurityTest">
        <displayName>WindowsPhone8NativePush</displayName>
        <description>WindowsPhone8NativePush</description>
        <pushSender></pushSender></p>
    </nativeWindowsPhone8App>
  3. Edit the wlclient.properties file.

    Edit the wlclient.properties file in your native Windows Phone 8 project and enter appropriate values for the following fields:

    • wlServerHost - The host name or IP address of the MobileFirst Server instance.
    • wlServerPort - The port on which MobileFirst Server is listening.
    • wlServerContext - The context root of your MobileFirst Server instance.

    missing_alt

  4. Modify the native Windows Phone 8 project.

    Edit the Properties\WMAppManifest.xml file and add the following capabilities:

    <Capability Name="ID_CAP_PUSH_NOTIFICATION" />
    <Capability Name="ID_CAP_IDENTITY_DEVICE" />
  5. Select a notification type

Last modified on November 09, 2016