question

Lucas-1232 avatar image
0 Votes"
Lucas-1232 asked ·

Push notification in UWP after covert

I want to let my console app to use the push notification in UWP, so my team decide to covert our Console app to UWP. The question is how to implement the push notification after convert.
Thanks.

windows-uwpwindows-desktop-bridge
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichardZhang-MSFT avatar image
0 Votes"
RichardZhang-MSFT answered ·

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 and xmlns:desktop to the package.appxmanifest file. For more settings, please refer to here.

  • For classic Win32 apps, set up the AUMID so that you can send toasts, and then also specify a CLSID on your shortcut. This can be any random GUID. Don't add the COM 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 stub CLSID 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.









· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks. I will try.

0 Votes 0 · ·