You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you test creating scheduled toast notifications without ever calling the CreateToastNotifier.Show() function?
If my app just creates scheduled toast notifications, it doesn't seem to work. One thing I tested was creating a build that creates notifications immediately using .show(), then replacing it with the one that uses AddToSchedule and then it starts working. There must be something that .show() is doing that AddToSchedule isn't, because until I call show() I never see my app in the Notification & Actions section of the Windows Settings. But, I don't see anything in the documentation on scheduled notifications that indicate this....
var toast = new ScheduledToastNotification(toastContent.GetXml(), DateTime.Now.AddSeconds(5));
DesktopNotificationManagerCompat.CreateToastNotifier().AddToSchedule(toast);
Will work...
ToastNotification toast = new ToastNotification(toastContent.GetXml());
DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast);
var toast = new ScheduledToastNotification(toastContent.GetXml(), DateTime.Now.AddSeconds(5));
DesktopNotificationManagerCompat.CreateToastNotifier().AddToSchedule(toast);
The text was updated successfully, but these errors were encountered:
derrickberg-dev
changed the title
Creating Scheduled Toast Notifications
Issue Creating Scheduled Toast Notifications
Oct 5, 2020
I can build a version that creates 1 notification using .show() then delete it and replace it with the version that only uses .AddToSchedule() to create notifications and everything works.
What does calling .show() do in the background that .AddToSchedule() isn't doing? I see that using .show() winds up putting my app in the Notifications & Actions, where .AddToSchedule() never would.
Hello,
Could you test creating scheduled toast notifications without ever calling the CreateToastNotifier.Show() function?
If my app just creates scheduled toast notifications, it doesn't seem to work. One thing I tested was creating a build that creates notifications immediately using .show(), then replacing it with the one that uses AddToSchedule and then it starts working. There must be something that .show() is doing that AddToSchedule isn't, because until I call show() I never see my app in the Notification & Actions section of the Windows Settings. But, I don't see anything in the documentation on scheduled notifications that indicate this....
https://github.com/MicrosoftDocs/windows-uwp/blob/docs/windows-apps-src/design/shell/tiles-and-notifications/scheduled-toast.md
Doesn't work...
Will work...
The text was updated successfully, but these errors were encountered: