0

I am new in WinUI3. I want to know how can implement push notification scenario for Desktop Application in WinUI3. Previously I worked on UWP and also I got the sample that I have to register a background task for push notification. And when a raw notification is sent, my background task activated and I can show a toast notification.

I have found a sample and a guide, https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/notifications

https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications/Push

But from sample of Winui3, I found a .cpp console application. I have to implement packaged application in C#. So how a raw notification will wake up my application? There is no background task. So how can i implement winui3 application in c# so that I can receive a raw notification even my application is in terminated state and show a toast notification.

2
  • You could refer to the Doc: App notifications from UWP to WinUI 3 migration Commented Nov 28, 2024 at 7:38
  • @Jeaninez-MSFT this document is for App notification or Toast Notification. Whatever can you please explain how Winui3 can get a raw push notification though app is in terminate state? Like UWP can get this via Background Task. Commented Nov 28, 2024 at 9:43

2 Answers 2

0

You could follow the guide: Push notifications functionality migration

1,You need to create an Azure account, and create an Azure App Registration (AAD).

2,Use the Azure AppID for your identity

3,Configure your app to receive push notifications.

4, all configuration is complete, you could send a push notification to your app.

For more detail steps you could follow the Doc: Quickstart: Push notifications in the Windows App SDK

Sign up to request clarification or add additional context in comments.

Comments

0

Add the Visual Studio Extension - "Template Studio for Win UI C#". Create a new Win UI 3 Project using the Win UI3 Template - This will create a new project that contains sample code for sending Notifications to Windows.

1 Comment

This does not have implementation for push notification. It is just App Notification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.