【发布时间】:2020-07-14 11:55:08
【问题描述】:
我遵循来自https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/local-notifications 的有关本地通知的文档。我实现了它并且工作得很好。现在我的情况是:用户输入 Start Date , Repetition time 和 Number of Repetitions 。我可能需要一些后台服务来调用此推送通知?有什么建议可以在设备中安排这个吗?
更新
我从这个链接添加了共享服务:https://www.c-sharpcorner.com/article/how-to-send-local-notification-with-repeat-interval-in-xamarin-forms/
现在我不知道如何停止 Alarm Manager 和 UILocalNotification 当我发送示例用户输入发送 20 个通知时,必须停止 20 个通知。
【问题讨论】:
-
您好,您的意思是要在新设置到来之前停止通知?
-
@JuniorJiang-MSFT 如果用户每 10 分钟输入 10 次。 10 点后通知必须取消。
-
好的,我们需要在每次执行任务后计算时间。次数可以本地存储,如果时间符合设置,会取消你想要的日程。
-
@JuniorJiang-MSFT 如何取消?
-
这意味着我们需要根据另一个计算停止时间的计划手动取消计划。如果不介意在 Page 中添加开关控制,那会让客户决定是否需要关闭重复的通知。
标签: xamarin.forms localnotification