Notification Activation Flow
Local app notifications require content, manifest activation, registration, and app-side routing.
Flow
Button click
-> AppNotificationBuilder creates payload
-> AppNotificationManager.Show displays notification
-> User clicks notification
-> Windows activates app through manifest/COM registration
-> App registers notification manager
-> App reads activation args
-> App chooses foreground UI or silent action
Startup Order
_window = new MainWindow();
AppNotificationManager.Default.NotificationInvoked += OnNotificationInvoked;
AppNotificationManager.Default.Register();
var activatedArgs = AppInstance.GetCurrent().GetActivatedEventArgs();
The official quickstart calls out that Register must happen before GetActivatedEventArgs.
Failure Modes
| Symptom | Likely cause |
|---|---|
| Notification does not show | App is elevated, notification settings, package/manifest issue |
| Click does nothing | COM activation manifest missing or mismatched GUID |
| Background button launches UI unexpectedly | Desktop apps must process activation arguments and decide behavior |
| Works while running, fails from closed | Closed-app activation path not handled |