Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Step-by-Step Setup Instructions

This topic provides detailed instructions for integrating your Windows Phone mobile app with Oracle Push Cloud Service.

Before You Continue


Set Up the PushIO SDK

[1] Log in to your PushIO Account using the PushIO Manager Web Dashboard, and then add a Windows Phone Platform.

"Web Dashboard adding Windows Phone platform image"

[2] Download the pushio_config.json file that needs to be included in your Windows Phone project. The pushio_config.json contains the PushIO API Key and must be integrated as a part of your application in Visual Studio.

"Downloading the pushio_config.json file image"

[3] Add the pushio_config.json file to your project, and change its Build Action to Content.

"Adding the pushio_config.json file to project image"

[4] Download the PushIOManager SDK and add the .DLL file from the download as a reference in your Windows Phone App.

NOTE: If Visual Studio says "A reference to a higher version or incompatible assembly cannot be added to the project," try unblocking the .DLL file in Windows Explorer manually.

Integrate PushIOManager

Step 1: Add required capabilities to WMAppManifest.xml:

[1.1] On the Capabilities tab, enable ID_CAP_PUSH_NOTIFICATION.

[1.2] On the Packaging tab, ensure that the ProductID and Publisher ID are the same as that of your MSDN project.

Step 2: Add code to initialize your application on startup:

[2.1] In the App's main.xaml.cs, add the following code:

this.PushIOManager = PushIOManager.getInstance();
this.PushIOManager.EngagementId = Guid.NewGuid().ToString();

This call takes the root frame of your application. This call ensures that push notifications are set up correctly and reports any changes back to Push IO. This call runs mostly on background threads.

[2.2] Enable Push (Opt-In for Push Notifications) - Required for Windows Phone Marketplace

Windows Phone Marketplace requires the user to opt-in for Push Notifications. The Push IO Manager contains a property named PushEnabled (set to false by default) that helps developers comply with this requirement.

There are two ways to enable push:

[2.3] Register for NotificationReceived Events

When a Windows Phone application is open, it will not shows toasts for push notifications. To handle these notifications, you must register a handler for the Push IO Manager NotificationReceived event. This event will include the NotificationEventArgs, which has a collection that contains the push payload. The most common values to use are "wp:Text1" and "wp:Text2", which are the Title and Message properties, respectively.

this.PushIOManager.NotificationReceived += (sender, args) =>
    String title;
    String message;
    args.Collection.TryGetValue("wp:Text1", out title);
    args.Collection.TryGetValue("wp:Text2", out message);
    Deployment.Current.Dispatcher.BeginInvoke(() =>
        MessageBox.Show(message, title, MessageBoxButton.OK);

Ready, Set, Push!

Now that you've integrated the Oracle Push Cloud Service SDK, it's time to test your integration.

  1. Log into the Web Dashboard.
  2. Navigate to the Push tab.
  3. Choose All Active Devices from the Audience dropdown menu.
  4. Type in a message and click Send Now.

If all went well, you should see your first true Windows Phone push notification!

What's Next?

Now that you have completed the basic configuration and have tested push notifications, we recommend that you continue to the following topics: