Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 2.63 KB

pushnotificationchannelmanager.md

File metadata and controls

57 lines (41 loc) · 2.63 KB
-api-id -api-type
T:Windows.Networking.PushNotifications.PushNotificationChannelManager
winrt class

Windows.Networking.PushNotifications.PushNotificationChannelManager

-description

Creates objects that you use to retrieve push notification channels from the Windows Push Notification Services (WNS). These channels are bound to an app or secondary tile.

-remarks

Version history

Windows version SDK version Value added
1607 14393 GetForUser
1703 15063 GetDefault
2004 19041 ChannelsRevoked

-examples

The following example shows the use of the CreatePushNotificationChannelForApplicationAsync method to retrieve a push notification 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;
    }
);

The following example shows the use of the CreatePushNotificationChannelForSecondaryTileAsync method to retrieve a push notification channel for a secondary tile.

var pushNotifications = Windows.Networking.PushNotifications;
var channel;

pushNotifications.PushNotificationChannelManager.createPushNotificationChannelForSecondaryTileAsync(myTileId).then(function (channel) {
    // Your code here.
})

-see-also

PushNotificationChannel, Windows Push Notification Services (WNS) overview, Push and periodic notifications sample (archived), Quickstart: Sending a push notification, How to request, create, and save a notification channel, Push notification service request and response headers

-capabilities

internetClient