PushNotificationChannelManagerForUser PushNotificationChannelManagerForUser PushNotificationChannelManagerForUser PushNotificationChannelManagerForUser PushNotificationChannelManagerForUser Class

Definition

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

public : sealed class PushNotificationChannelManagerForUser
struct winrt::Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser
public sealed class PushNotificationChannelManagerForUser
Public NotInheritable Class PushNotificationChannelManagerForUser
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

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.PushNotificationChannelManagerForUser.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.PushNotificationChannelManagerForUser.createPushNotificationChannelForSecondaryTileAsync(myTileId).then(function (channel) {
    // Your code here.
})

Remarks

This class does not have a constructor. For more information about usage, see the examples section.

Version history

Windows version SDK version Value added
1703 15063 CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer,String)
1703 15063 CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer,String,String)

Properties

User User User User User

Gets the user.

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.

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.

CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, 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.

CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String) CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, 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.