OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Support

Windows Phone SDK Setup

OneSignal Windows Phone 8.0 and 8.1 SDK Setup Guide.

For Developers

Using an app framework?

If you're using an app framework to build your Windows Phone app, we have higher level SDKs for the following: Unity, PhoneGap, Cordova, Ionic, Intel XDK, and Marmalade.

Windows Phone 10

OneSignal does not UWP projects yet. However Windows Phone 8.1 projects will run and support push notifications on both Window Phone 8.1 & 10 devices.


Setup SDK

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1. Add OneSignal to your Project

1.1 Download the OneSignal Windows Phone SDK.

1.2 Copy the Release/OneSignalSDK_WP81_Release folder into your project folder.

1.3 In Visual Studio, right click on References and go to "Add Reference...".

1.4 Browse for OneSignalSDK_WP_WNS.dll and press OK.

Silverlight Compatibility

The OneSignal SDK is currently not compatibility with Silverlight or Windows UWP (Windows Universal Platform) Projects.

2. Package.appxmanifest Settings

2.1 Double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

2.2 Under the Capabilities tab make sure "Internet (Client & Server)" is checked. Lastly make sure to save.

3. Add Code

3.1 Open App.xaml.cs under App.xaml and the following OneSignal.init code below to your OnLaunched method.

using OneSignalSDK_WP_WNS;

protected override void OnLaunched(LaunchActivatedEventArgs e) {
	OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", e);
}

Repalce b2f7f966-d8cc-11e4-bed1-df8f05be55ba with your OneSignal App Id.

3.2 Optionally, you can add a notification opened callback that fires when a notification is opened. This callback also fires when a notification is received when your app is being used instead of displaying a notification.

protected override void OnLaunched(LaunchActivatedEventArgs e) {   
	OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", e, notificationOpened);
}

private void notificationOpened(string message, IDictionary<string, string> additionalData, bool isActive) {
   System.Diagnostics.Debug.WriteLine("notificationOpened:message:" + message);
   System.Diagnostics.Debug.WriteLine("notificationOpened:additionalData:" + additionalData);
   System.Diagnostics.Debug.WriteLine("notificationOpened:isActive:" + isActive);
}

4. Associate App with the Store

Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

4.1 Right click on your VS project and select Store>Associate App with the Store...

4.2 Click Next and sign into your Microsoft account.

4.3 Select your app and press Next.

4.4. Lastly, press Associate.

Done! You should be all set to go with your Windows Phone 8.1 app.


Setup SDK (Windows Phone 8.0)

Windows Phone 8.0

1. Add our library

1.1 Download the OneSignal Windows Phone SDK.

1.2 Copy the Release/OneSignalSDK_WP80_Release folder into your project folder.

1.3 In Visual Studio, right click on References and go to "Add Reference...".

2. Add the required Capabilities

2.1 Under Properties folder, open WMAppManifest.xml and then select the Capabilities tab on top. Enable the following 3 capabilities; ID_CAP_IDENTITY_DEVICE,ID_CAP_NETWORKING, and ID_CAP_PUSH_NOTIFICATION.

3. Add Required Code

3.1 In your MainPage.xaml.cs file add using OneSignalSDK; to the top.

3.2 Add the following methods to your MainPage.xaml.cs file:

protected override void OnNavigatedTo(NavigationEventArgs navEventArgs) {
    base.OnNavigatedTo(navEventArgs);
    OneSignal.Init("5eb5a37e-b458-11e3-ac11-000c2940e62c", ReceivedNotification);
}
// Called when the user opens a notification or one comes in while using the app.
private static void ReceivedNotification(string message, IDictionary<string, string> additionalData, bool isActive) {
}

3.3 Replace 5eb5a37e-b458-11e3-ac11-000c2940e62c with your OneSignal App Id.

Done! You should be all set to go with your Windows Phone 8.0 app.


Windows Phone SDK Setup

OneSignal Windows Phone 8.0 and 8.1 SDK Setup Guide.

For Developers