PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync() | createPushNotificationChannelForApplicationAsync() method
Creates an object, bound to the calling app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).
Syntax
Windows.Networking.PushNotifications.PushNotificationChannelManager.createPushNotificationChannelForApplicationAsync().done( /* Your success and error handlers */ );
Parameters
This method has no parameters.
Return value
Type: IAsyncOperation<PushNotificationChannel>
The object, bound to the calling app, that is used to request a PushNotificationChannel from the WNS.
Remarks
Tile update, toast, and badge notifications that arrive on this channel are delivered to the app's main or default tile.
Examples
The following example shows the use of this method to retrieve a channel for the calling app.
var pushNotifications = Windows.Networking.PushNotifications; var channel; function openNotificationsChannel() { var channelOperation = pushNotifications.PushNotificationChannelManager.createPushNotificationChannelForApplicationAsync(); return channelOperation.then(function (newChannel) { channel = newChannel; } );
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
- PushNotificationChannelManager
- CreatePushNotificationChannelForApplicationAsync(String)
- Push notification 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
Build date: 12/4/2012
