我正在为UWP进行Toast通知并使用Microsoft.UI.Notifications.ScheduledToastNotification。
I am working on toast notifications for UWP and using Microsoft.UI.Notifications.ScheduledToastNotification.
每当我尝试使用贪睡选项安排通知时,都不会打盹。通知只会触发一次,不会重复。我使用的是ScheduledToastNotification构造函数,其中的参数包括XmlContent, DeliveryTime,SnoozeInterval和 MaximumSnoozeCount。
Whenever I try to schedule a notification with snooze option, it is not snoozing. The notification will be triggered just once and there is no repetition. I am using theScheduledToastNotification constructor in which parameters include XmlContent, DeliveryTime, SnoozeInterval andMaximumSnoozeCount.
以下是代码段:
var scheduledToast = new ScheduledToastNotification(content, startTime, TimeSpan.FromSeconds(90), 3); //content includes just the title and the message for the toast notification scheduledToast.Id = "notificationId"; scheduledToast.Group = "categoryId"; ToastNotifier toastNotifier = ToastNotificationManager.CreateToastNotifier(); toastNotifier.AddToSchedule(scheduledToast);我是否遗漏了某些东西或是否存在任何问题?
Am I missing something or is there any issue with the same?
Rohit Garg。
Rohit Garg.
推荐答案
hi
我建议您查看 docs.microsoft/en- us / windows / uwpcommunitytoolkit / 集合,其中还包括Toast通知
i would recommend to take a look at thedocs.microsoft/en-us/windows/uwpcommunitytoolkit/ collection which also includes toast notifications
br Andre
br Andre
更多推荐
[UWP] [C#] ToastNotification Snooze在UWP中不起作用
发布评论