0
我有我的课堂提醒文件。在正确的时间我有通知。我创建NotificationExtension如何在uwp应用程序中工作交互式通知?
ToastContent content = new ToastContent()
{
Launch = "OrangeReminder",
Visual = new ToastVisual()
{
TitleText = new ToastText()
{
Text = "OrangeReminder"
},
BodyTextLine1 = new ToastText()
{
Text = ""
},
BodyTextLine2 = new ToastText()
{
Text = ""
},
},
Actions = new ToastActionsCustom()
{
Buttons =
{
new ToastButton("Done", "1")
{
ActivationType = ToastActivationType.Background,
}
}
},
};
通知我创建后台任务
namespace BackgroundTasks
{
public sealed class ToastNotificationBackgroundTask : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
var details = taskInstance.TriggerDetails as ToastNotificationActionTriggerDetail;
var arguments = details.Argument;
//???
}
我在后台任务就写什么,从我的文件时,按下按钮在通知中删除提醒?我想我需要我的提醒ID?如何得到它?
对于关于获取提醒ID的问题,我在下面发布了一个答案。获取提醒ID后,如何从文件中删除提醒?这个文件是什么意思?它是否放置在本地存储中?我对此有点好奇:) –
我有收集文件“AllReminder.json”文件。我只是加载文件,加载收集并删除它“删除(GetRemObject)。 – SuxoiKorm
我试试这个 if(arguments ==”1“) { LoadFile(); DS.AllRem.RemoveAt(1); } 但他没有工作,通知并没有消失,而且提醒也没有删除 – SuxoiKorm