PushNotificationChannelManager PushNotificationChannelManager PushNotificationChannelManager PushNotificationChannelManager PushNotificationChannelManager Class

Definition

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.

public : static class PushNotificationChannelManager
static struct winrt::Windows::Networking::PushNotifications::PushNotificationChannelManager
public static class PushNotificationChannelManager
Public Static Class PushNotificationChannelManager
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
internetClient

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.
})

Methods

CreatePushNotificationChannelForApplicationAsync() CreatePushNotificationChannelForApplicationAsync() CreatePushNotificationChannelForApplicationAsync() CreatePushNotificationChannelForApplicationAsync() 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) CreatePushNotificationChannelForApplicationAsync(String) CreatePushNotificationChannelForApplicationAsync(String) CreatePushNotificationChannelForApplicationAsync(String) CreatePushNotificationChannelForApplicationAsync(String)

Creates an object, bound to a specified app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The specified app must be in the same package as the calling app. This overload should only be called from a multi-app package, most apps should use the method with no parameter.

CreatePushNotificationChannelForSecondaryTileAsync(String) CreatePushNotificationChannelForSecondaryTileAsync(String) CreatePushNotificationChannelForSecondaryTileAsync(String) CreatePushNotificationChannelForSecondaryTileAsync(String) CreatePushNotificationChannelForSecondaryTileAsync(String)

Creates an object, bound to a secondary tile, through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The tile can be a secondary tile of the calling app or any other app in the same package.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Gets the manager for the active user.

GetForUser(User) GetForUser(User) GetForUser(User) GetForUser(User) GetForUser(User)

Gets the push notifications for the specified user.

See Also