[UWP] [C#] ToastNotification Snooze在UWP中不起作用

编程入门 行业动态 更新时间:2024-10-24 20:17:28
本文介绍了[UWP] [C#] ToastNotification Snooze在UWP中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在为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中不起作用

本文发布于:2023-11-27 21:17:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639635.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   UWP   ToastNotification   Snooze

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!