WP8 App opens by tapping on Toast

感情迁移 提交于 2019-12-12 01:44:38

问题


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?

Suppose I cannot get any information from the toast.


回答1:


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!

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 – 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 – 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 – Contains name/value pairs of info passed to the default start screen of the app. The string must begin with a "?".



来源:https://stackoverflow.com/questions/25358711/wp8-app-opens-by-tapping-on-toast

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!