Skip to content

Issue Creating Scheduled Toast Notifications #21

@derrickberg-dev

Description

@derrickberg-dev

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...

            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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions