Windows SDK Integration

Supports Windows 8.1, Windows Phone 8.1, Windows 10

SDK Integration

You can use an emulator while working with push notifications.

To integrate Pushwoosh into your application, follow the steps below.

1. Download our SDK package.

2. Add reference to PushSDK/Project-Win8.1-WNS/PushSDK.winmd to your project
Or PushSDK/Project-Win10-WNS/PushSDK.winmd if you develop for Windows 10

3. In the code add PushSDK namespace: using PushSDK;

4. Initialize push service with the following code:

NotificationService service = PushSDK.NotificationService.GetCurrent("YOUR_PUSHWOOSH_APP_ID");
service.OnPushAccepted += (sender, pushNotification) => {
    //code to handle push notification
    string pushString = pushNotification.ToString(); //will return json push payload
};
 
service.OnPushTokenReceived += (sender, pushToken) => {
    //code to handle push token
};
 
service.OnPushTokenFailed += (sender, errorMessage) => {
    //code to handle push subscription failure
};
 
service.SubscribeToPushService();

5. In your App.xaml.cs in OnLaunched function add:

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
    NotificationService.HandleStartPush(args.Arguments);
 
    //other code
}

Important!

If you plan to use Toast notifications, make sure Toast notifications are switched on in your application project. Go to the Application UI tab in manifest settings, and set Toast Capable to Yes. Otherwise, Toast notifications will not work on the device.

Piece of cake?

Windows SDK Integration