WP8 应用程序通过点击 Toast 打开 [英] WP8 App opens by tapping on Toast

查看:44
本文介绍了WP8 应用程序通过点击 Toast 打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Windows Phone 8 开发应用程序.我需要通过点击 Toast 通知来检查我的应用程序是否已打开.我怎样才能做到这一点?

I'm developing an application for windows phone 8. I need to check if my app is opened by tapping on a toast notification. How can I do that?

假设我无法从 toast 中获取任何信息.

Suppose I cannot get any information from the toast.

推荐答案

如果您在此处查看 MSDN 文章 http://msdn.microsoft.com/en-us/library/windows/apps/jj662938(v=vs.105).aspx,您会看到可以向 Toast 添加额外的信息,您可以在应用中使用这些信息!

If you check out the MSDN article here http://msdn.microsoft.com/en-us/library/windows/apps/jj662938(v=vs.105).aspx, you'll see that it is possible to add extra information to the toast that you can use in your app!

使用 Toast 通知深度链接到屏幕您可以使用 Param 元素或 NavigateUri 属性,具体取决于您创建 Toast 通知的方式,以深层链接到您的应用程序中的特定屏幕.以下是允许的格式.以下示例中使用的任何字符串不得超过 256 个字符.

Deep linking to a screen using toast notifications You can use the Param element or NavigateUri property, depending on how you're creating the toast notification, to deep link to a specific screen in your app. Here are the allowed formats. Any string used for the following examples must be 256 characters or less.

/page1.xaml – 定义应用启动时导航到的屏幕.字符串必须以/"开头.

/page1.xaml – Defines the screen to navigate to in the app when the app starts. The string must begin with a "/".

/page1.xaml?value1=1234 &value2=9876 – 定义应用启动时导航到的屏幕,以及名称/值对信息.字符串必须以/"开头.

/page1.xaml?value1=1234 &value2=9876 – Defines the screen to navigate to when the app starts, along with name/value pairs of info. The string must begin with a "/".

?value1=1234 &value2=9876 – 包含传递到应用程序默认开始屏幕的信息名称/值对.字符串必须以?"开头.

?value1=1234 &value2=9876 – Contains name/value pairs of info passed to the default start screen of the app. The string must begin with a "?".

这篇关于WP8 应用程序通过点击 Toast 打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆