Windows Phone 8.0后台代理是否可以连接系统触发收到的短信?

时间:2015-09-06 22:25:06

标签: c# windows-phone-8 windows-phone

大家好我试图用系统触发事件(对于短信)连接我的后台任务但是我不能这样做也许我仍然是noob程序员但是它甚至可以用于连接带有bacground代理的传入短信的系统触发器用于Windows Phone 8 ?

https://msdn.microsoft.com/en-us/library/windows/desktop/windows.applicationmodel.background.systemtrigger.triggertype.ASPx

https://msdn.microsoft.com/en-us/library/windows/desktop/windows.applicationmodel.background.systemtrigger.triggertype.ASPx

protected override void OnInvoke(ScheduledTask task)
{
    string toastMessage = "";

    if (task is PeriodicTask)
    {   
        toastMessage = "Periodic task running.";
    }
    else
    {
        toastMessage = "Resource-intensive task running.";
    } 

    ShellToast toast = new ShellToast();
    toast.Title = "Background Agent Sample";
    toast.Content = toastMessage;
    toast.Show();

    NotifyComplete();
}

0 个答案:

没有答案
相关问题