Is there something similar to ScheduledToastNotification as for UWP apps ? #3853
Replies: 5 comments
-
It works with Microsoft.Toolkit.Uwp.Notifications package (tested on Windows 10 22H2) |
Beta Was this translation helpful? Give feedback.
-
That namespace is only suitable for Windows 10 UWP app project.
But I want to create a WINUI3 desktop application. The documentation says that to use notifications I need to use the "Microsoft.Windows.AppNotifications" namespace. But in that namespace I can't find the ScheduledToastNotifications.
I suspect that they are not supported in the current 1.4 version of WinAppSdk. Or they are hidden somewhere.
Has anyone managed to use them in a WINUI 3 desktop application ?
…________________________________
Da: castorix ***@***.***>
Inviato: giovedì 14 settembre 2023 00:38
A: microsoft/WindowsAppSDK ***@***.***>
Cc: Moreno Borsalino ***@***.***>; Author ***@***.***>
Oggetto: Re: [microsoft/WindowsAppSDK] Is there something similar to ScheduledToastNotification as for UWP apps ? (Discussion #3853)
It works with Microsoft.Toolkit.Uwp.Notifications package (tested on Windows 10 22H2)
(Schedule a toast notification<https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/scheduled-toast>)
—
Reply to this email directly, view it on GitHub<#3853 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHTSTTSBSJG7D3M6IBD5FADX2IYXDANCNFSM6AAAAAA4XAZ7NA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
No, it is for Desktop Apps (with ToastNotificationManagerCompat, as the doc says : I tested in WinUI 3/C#, unpackaged Desktop app |
Beta Was this translation helpful? Give feedback.
-
Toast notifications have always been usable from desktop applications. The issue tends to be toast notifications require a COM server registration. If you look at both WCT's ToastNotificationManagerCompat and WinAppSDK's AppNotificationManager, there is code that registers the application as a COM server. So technically, you don't need the WCT or WinAppSDK to do use a sheduled notification at all. As long as you register things properly, you can just roll your own in any unpackaged desktop application. The Windows App SDK's App Notifications do not currently support scheduled notifications. However, since App Notifications are just a wrapper around Toast Notifications anyway, try just using ScheduledToastNotification after you register the manager. |
Beta Was this translation helpful? Give feedback.
-
I thank @castorix and @DarranRowe for the valuable information that allowed me to understand and solve the problem. // Construct the content and schedule the toast! And with immense joy after 5 seconds the toast notification appears! Even if the application is closed! It's exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to port a UWP app that uses ScheduledToastNotification but I can't find anything similar in the WinAppSdk notifications documentation.
Can anyone help me and explain if something similar exists or is it a missing feature?
Beta Was this translation helpful? Give feedback.
All reactions