Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Schedule toast notifications #5050

Open
whiskhub opened this issue Jan 18, 2025 · 1 comment
Open

Feature Request: Schedule toast notifications #5050

whiskhub opened this issue Jan 18, 2025 · 1 comment
Labels
area-Notifications Toast notification, badges, Live Tiles, push notifications feature proposal

Comments

@whiskhub
Copy link

The ToastContentBuilder of the previous Microsoft.Toolkit.Uwp.Notifications API had the ability to schedule toast notifications for a date/time using ToastContentBuilder.Schedule.

The AppNotificationBuilder and AppNotificationManager APIs of Windows App SDK do not offer such an Scheduling API yet. This gap should be closed.

Also see discussions #5046, #3853.

@true-perfect-code
Copy link

true-perfect-code commented Jan 19, 2025

Please also implement all the accompanying functionality that UWP offers, for example the removing of a notification that has already been passed to Windows, e.g in UWP.:

var notifier = ToastNotificationManagerCompat.CreateToastNotifier();
var scheduled = notifier.GetScheduledToastNotifications();
foreach (var notification in scheduled)
      notifier.RemoveFromSchedule(notification);

Without this functionality, even scheduled notifications make absolutely no sense, because if the user changes his appointment, you must first delete it from Windows and only then set a new one.

It is best to migrate everything to winappSDK that UWP also offers, then you really can't do anything wrong.

Because UWP.Notifications Nuget has been around since 2016-2022. in these 6 years we will probably have understood what we need and what we don't need from the notification functionality. To decide independently in WinAppSDK which notification functionalities are taken over by UWP.Notifications and which are not (like sceduling here) really makes absolutely no sense and only makes the acceptance of MAUI more difficult.

pc

EDIT

If someone needs scheduled notifications for MAUI, then you have to use UWP.Notifications Nuget (as of January 2025) and there is a workaround from @whiskhub to get the ID sent by Windows. However, we all hope that the WinAppSDK team will implement a complete migration from UWP.Notification to windowsAppSDK so that WinAppSDK can be used for local notification in MAUI (as is also planned by Microsoft)

You can find a working example here: https://github.com/true-perfect-code/MauiApp1_UWPNotifications

pc

@RDMacLachlan RDMacLachlan added feature proposal area-Notifications Toast notification, badges, Live Tiles, push notifications and removed needs-triage labels Jan 22, 2025
@RDMacLachlan RDMacLachlan added this to the Future (backlog) milestone Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Notifications Toast notification, badges, Live Tiles, push notifications feature proposal
Projects
None yet
Development

No branches or pull requests

3 participants