To subscribe to push notification within an app, we first attempt to retrieve an existing
HttpNotificationChannel by name.
channel = HttpNotificationChannel.Find("<a channel name>");
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 ...