【问题标题】:How to Deep Link Push Notification in WP8如何在 WP8 中深度链接推送通知
【发布时间】:2014-09-19 05:58:54
【问题描述】:

我正在使用 Parse 向我的应用发送推送通知。我遵循了documentation 中的所有步骤。它工作得很好。

当我收到推送通知时,点击它会启动应用程序。但是我想导航到我的应用程序中的特定页面。我无法找到在哪里设置此导航参数。有没有办法做到这一点?

如果可以,那么在导航到该页面时如何通过查询字符串传递参数?

【问题讨论】:

    标签: windows-phone-8 push-notification parse-platform deep-linking


    【解决方案1】:

    我找到了这个样本。您可以将自定义 xaml 文件设置为启动 url。 这是完整的项目:WNS Notifications for Windows and Windows Phone Universal App Sample。希望对您有所帮助。

     var toastDescriptor = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);
    
            var txtNodes = toastDescriptor.GetElementsByTagName("text");
    
            txtNodes[0].AppendChild(toastDescriptor.CreateTextNode("SL8.1 Demo"));
            txtNodes[1].AppendChild(toastDescriptor.CreateTextNode("Deeplink me"));
    
            // Launch args
            var toastNode = toastDescriptor.SelectSingleNode("toast");
            ((XmlElement)toastNode).SetAttribute("launch", "/toastpage.xaml?findme=true");
    
            var toast = new ToastNotification(toastDescriptor);
            var toastNotifier = ToastNotificationManager.CreateToastNotifier();
            toastNotifier.Show(toast);
    

    【讨论】:

    • 你能具体帮我解析一下吗?我会调查上述信息并更新您。
    • 以及特定于 Windows Phone 8 的(不是 8.1)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-25
    • 1970-01-01
    • 1970-01-01
    • 2019-09-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多