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 ref class PushNotificationChannelManagerForUser sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PushNotificationChannelManagerForUser final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PushNotificationChannelManagerForUser final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PushNotificationChannelManagerForUser
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PushNotificationChannelManagerForUser
Public NotInheritable Class PushNotificationChannelManagerForUser
Inheritance
Object Platform::Object IInspectable PushNotificationChannelManagerForUser
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

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

Gets the user.

Methods

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). The specified app must be in the same package as the calling app.

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)

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)

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.

Applies to