Push notifications in native Windows Phone 8 applications
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:
- Creating your first Native Windows Phone 8 MobileFirst application
- Invoking adapter procedures from native Windows Phone 8 applications
The following topics are covered:
Even source notification
Event source notification sends notification messages that are targeted to devices with a user subscription.
Broadcast notification sends notification messages that are targeted to all subscribed devices.
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
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.
Add the "pushSender" tag to the
wlclient.propertiesfile 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.
Modify the native Windows Phone 8 project.
Properties\WMAppManifest.xmlfile and add the following capabilities:
Select a notification type
- Broadcast notifications in native Windows Phone 8 applications
- Event source-based notifications in native Phone Windows 8 applications
- Tag-based notifications in native Windows Phone 8 applications