PushNotificationManager Class

Definition

Provides APIs for receiving and registering to receive push notifications.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

public ref class PushNotificationManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.PushNotifications.PushNotificationsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PushNotificationManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.PushNotifications.PushNotificationsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PushNotificationManager
Public NotInheritable Class PushNotificationManager
Inheritance
Object Platform::Object IInspectable PushNotificationManager
Attributes

Remarks

Get an instance of this class by accessing the PushNotificationManager.Default property.

Properties

Default

Gets the default instance of the PushNotificationManager class.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

Methods

CreateChannelAsync(Guid)

Asynchronously requests a push channel from the Windows Push Notification Service (WNS).

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

IsSupported()

Gets a boolean value indicating if the Microsoft.Windows.PushNotifications notification APIs are supported for the calling app.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

Register()

Registers the app to receive PushReceived events when incoming notifications are received.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

Unregister()

Unregisters the app from receiving PushReceived events for incoming push notifications.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

UnregisterAll()

Cleans up all registration-related data for push notifications. After this, push notifications for the app will not function until Register is called again.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

Events

PushReceived

Raised when a push notification for the app is received by the platform.

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

Applies to