PushNotificationManager Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides APIs for receiving and registering to receive push notifications.
Notiz
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
- Attributes
Get an instance of this class by accessing the PushNotificationManager.Default property.
Default |
Gets the default instance of the PushNotificationManager class. Notiz 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. |
Create |
Asynchronously requests a push channel from the Windows Push Notification Service (WNS). Notiz 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. |
Is |
Gets a boolean value indicating if the Microsoft.Windows.PushNotifications notification APIs are supported for the calling app. Notiz 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. Notiz 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. Notiz 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 |
Cleans up all registration-related data for push notifications. After this, push notifications for the app will not function until Register is called again. Notiz 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. |
Push |
Raised when a push notification for the app is received by the platform. Notiz 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. |
Produkt | Versiounen |
---|---|
Windows App SDK | 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 |