Share via


AppNotificationManager Class

Definition

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.

Note

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
Object Platform::Object IInspectable AppNotificationManager
Attributes

Remarks

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

Properties

Default

Gets the default instance of the AppNotificationManager class.

Note

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.

Note

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.

Methods

GetAllAsync()

Gets all the app notifications for calling app that are currently displayed in Action Center.

Note

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.

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 NotificationInvoked events when the user interacts with an app notification.

Note

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.

Note

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.

RemoveAllAsync()

Asynchronously removes all app notifications for the app from Notification Center (called Action Center in Windows 10).

Note

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.

RemoveByGroupAsync(String)

Asynchronously removes all app notifications for the app that have the specified group identifier from Action Center.

Note

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.

RemoveByIdAsync(UInt32)

Asynchronously removes the app notification with the specified ID from Notification Center (called Action Center in Windows 10).

Note

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.

RemoveByTagAndGroupAsync(String, String)

Asynchronously removes all app notifications for the app that have the specified group and tag identifiers from Action Center.

Note

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.

RemoveByTagAsync(String)

Asynchronously removes all app notifications for the app that have the specified tag identifier from Notification Center (called Action Center in Windows 10).

Note

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(AppNotification)

Displays the specified app notification in Action Center.

Note

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.

Note

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.

UnregisterAll()

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.

Note

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.

UpdateAsync(AppNotificationProgressData, String, String)

Updates the progress data for app notifications with the specified tag and group identifiers.

Note

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.

UpdateAsync(AppNotificationProgressData, String)

Updates the progress data for app notifications with the specified tag identifier.

Note

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.

Events

NotificationInvoked

Raised when an app notification for the app is invoked through user interaction.

Note

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.

Applies to

See also