Hello,
Welcome to our Microsoft Q&A platform!
When preparing to add notifications to your app, you need to start support for the Windows 10 SDK for your app and add the necessary references, such as Windows.UI
. In addition, you also need to register on the notification platform.
The Desktop Bridge app and the classic Win32 app have some differences when it comes to notification registration.
- For Desktop Bridge apps, you need to add Declaration for
xmlns:com
andxmlns:desktop
to thepackage.appxmanifest
file. For more settings, please refer to [here](https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop#step -5-register-with-notification-platform). - For classic Win32 apps, set up the
AUMID
so that you can send toasts, and then also specify aCLSID
on your shortcut. This can be any randomGUID
. Don't add theCOM
server/activator. You're adding a "stub"COM CLSID
, which will cause Action Center to persist the notification. Note that you can only use protocol activation toasts, as the stubCLSID
will break activation of any other toast activations. Therefore, you have to update your app to support protocol activation, and have the toasts protocol activate your own app.
Enable notification support for Win32 and Desktop Bridge apps, please refer to this document.
---
If you are also interested in how to write notification content, you can read the following documents
Thanks.