PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync | createPushNotificationChannelForApplicationAsync methods

Applies to Windows and Windows Phone

Creates an object, bound to an app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).

Overload list

MethodDescription
CreatePushNotificationChannelForApplicationAsync() Creates an object, bound to the calling app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).
CreatePushNotificationChannelForApplicationAsync(String) Creates an object, bound to a specified app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).

Remarks

An exception is thrown if you attempt to register a WNS push notification channel when there is no data connection. The following table lists the HResult error codes and possible action your app can take when this happens.

Error CodeInterpretation
0x800704C6The notification platform is not able to connect to the WNS cloud due to data connectivity not being available or not working properly. Apps should subscribe to NetworkStatusChanged for connectivity change events and retry the channel request if the network becomes available.
0x803E011BThe notification platform is unable to connect to the WNS cloud. It can be also due to WNS cloud not responding or some other internal error. Apps should subscribe to NetworkStatusChanged for connectivity change events and retry the channel request if the network becomes available.
0x880403E9The notification platform is in the process of reconnecting back to the WNS cloud due to a earlier network connectivity change. Apps should retry the channel request later using an exponential back-off strategy.
0x80070102The earlier channel request async operation has timed out. Apps should retry the channel request later using an exponential back-off strategy.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Networking.PushNotifications
Windows::Networking::PushNotifications [C++]

Metadata

Windows.winmd

Capabilities

internetClient

See also

PushNotificationChannelManager
WNS overview
Push and periodic notifications sample
Quickstart: Sending a tile push notification
Quickstart: Sending a toast push notification
How to update a badge through push notifications
How to authenticate with the Windows Push Notification Service (WNS)
How to request, create, and save a notification channel
Guidelines and checklist for push notifications
Push notification service request and response headers

 

 

Show:
© 2014 Microsoft