【发布时间】:2015-03-30 09:03:42
【问题描述】:
我做了定时任务代理。它工作正常,但我不知道如何识别用户是通过 toast 通知还是通过正常点击磁贴打开应用程序。
或者你可能知道如何通过点击通知来打开不同的页面。
【问题讨论】:
标签: c# windows-phone-8 navigation notifications toast
我做了定时任务代理。它工作正常,但我不知道如何识别用户是通过 toast 通知还是通过正常点击磁贴打开应用程序。
或者你可能知道如何通过点击通知来打开不同的页面。
【问题讨论】:
标签: c# windows-phone-8 navigation notifications toast
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
string launchString = args.Arguments
If ( launchString ….)
{
rootFrame.Navigate(typeof(page2));
}
else
{
rootFrame.Navigate(typeof(MainPage));
}
...
}
【讨论】:
如果我理解正确——您需要在用户点击 toast 通知时打开应用程序。
这里都有详细介绍: How to handle activation from a toast notification (XAML)
【讨论】: