AppNotificationManager 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 managing app notifications, including showing and removing notifications in Notification Center (called Action Center in Windows 10), updating notification progress, and registering and unregistering for app notification invocations.
Bilješka
The AppNotificationManager 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 AppNotificationManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.AppNotifications.AppNotificationsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppNotificationManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.AppNotifications.AppNotificationsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppNotificationManager
Public NotInheritable Class AppNotificationManager
- Inheritance
- Attributes
Get an instance of this class by accessing the AppNotificationManager.Default property.
Default |
Gets the default instance of the AppNotificationManager class. Bilješka The AppNotificationManager 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. |
Setting |
Get the app notification setting status for the app, determining whether notifications are currently enabled or, if not, the mechanism through which notifications are currently disabled. Bilješka The AppNotificationManager 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. |
Get |
Gets all the app notifications for calling app that are currently displayed in Action Center. Bilješka The AppNotificationManager 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. Bilješka 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 NotificationInvoked events when the user interacts with an app notification. Bilješka The AppNotificationManager 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(String, Uri) |
Registers the app to receive NotificationInvoked events when the user interacts with an app notification. Bilješka The AppNotificationManager 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. |
Remove |
Asynchronously removes all app notifications for the app from Notification Center (called Action Center in Windows 10). Bilješka The AppNotificationManager 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. |
Remove |
Asynchronously removes all app notifications for the app that have the specified group identifier from Action Center. Bilješka The AppNotificationManager 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. |
Remove |
Asynchronously removes the app notification with the specified ID from Notification Center (called Action Center in Windows 10). Bilješka The AppNotificationManager 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. |
Remove |
Asynchronously removes all app notifications for the app that have the specified group and tag identifiers from Action Center. Bilješka The AppNotificationManager 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. |
Remove |
Asynchronously removes all app notifications for the app that have the specified tag identifier from Notification Center (called Action Center in Windows 10). Bilješka The AppNotificationManager 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. |
Show(App |
Displays the specified app notification in Action Center. Bilješka The AppNotificationManager 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 NotificationInvoked events when the user interacts with an app notification. Bilješka The AppNotificationManager 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 app notifications. After this, app notifications for the app will not function until until Register is called again. Bilješka The AppNotificationManager 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. |
Update |
Updates the progress data for app notifications with the specified tag and group identifiers. Bilješka The AppNotificationManager 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. |
Update |
Updates the progress data for app notifications with the specified tag identifier. Bilješka The AppNotificationManager 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. |
Notification |
Raised when an app notification for the app is invoked through user interaction. Bilješka The AppNotificationManager 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. |
Proizvod | Verzije |
---|---|
Windows App SDK | 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 |