O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Subscribing to Push Notification

To subscribe to push notification within an app, we first attempt to retrieve an existing HttpNotificationChannel by name.

channel = HttpNotificationChannel.Find("<a channel name>");

The HttpNotificationChannel.Find method does not raise an Exception and returns null if the channel with the specified name is not found. If so, a new instance must be created.

The Push Notification sample in the downloadable code contains a class called PushNotificationSubscriber, which manages subscription to the MPNS by wrapping a notification channel. The main benefit of using a wrapper for the notification channel is that if the PushNotificationSubscriber instance is unable to perform the subscription to the MPNS, due to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required