AppNotificationManager.NotificationInvoked Event

Definition

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.

// Register
event_token NotificationInvoked(TypedEventHandler<AppNotificationManager, AppNotificationActivatedEventArgs const&> const& handler) const;

// Revoke with event_token
void NotificationInvoked(event_token const* cookie) const;

// Revoke with event_revoker
AppNotificationManager::NotificationInvoked_revoker NotificationInvoked(auto_revoke_t, TypedEventHandler<AppNotificationManager, AppNotificationActivatedEventArgs const&> const& handler) const;
public event TypedEventHandler<AppNotificationManager,AppNotificationActivatedEventArgs> NotificationInvoked;
function onNotificationInvoked(eventArgs) { /* Your code */ }
appNotificationManager.addEventListener("notificationinvoked", onNotificationInvoked);
appNotificationManager.removeEventListener("notificationinvoked", onNotificationInvoked);
- or -
appNotificationManager.onnotificationinvoked = onNotificationInvoked;
Public Custom Event NotificationInvoked As TypedEventHandler(Of AppNotificationManager, AppNotificationActivatedEventArgs) 

Event Type

Remarks

To ensure that the NotificationInvoked event handler is called within the process of the running app, be sure to register the handler for this event before calling Register. Otherwise, a new process will be launched to handle the invocation.

Applies to

See also