Can I send parameters in push notifications to toast (Windows Phone)?

情到浓时终转凉″ 提交于 2019-12-04 07:20:40
Eran

Of course you can.

The XML of the toast notification you send from your server looks like this:

 <?xml version="1.0" encoding="utf-8"?>
 <wp:Notification xmlns:wp="WPNotification">
     <wp:Toast>
         <wp:Text1>[string]</wp:Text1>
         <wp:Text2>[string]</wp:Text2>
         <wp:Param>[string]</wp:Param>
     </wp:Toast>
   </wp:Notification>;

You use the Param parameter to send parameters to your app :

You can use the Param element 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 "?".

(taken from here)

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