0
votes

I need to send some data to a Windows Phone 8 app. I want to implement this through push notifications.

I'm currently serializing my data as JSON and place it in the wp:Param field in the push notification. While my app is running in the foreground, I receive the notification just fine, can deserialize the field and use the data.

However, when my app isn't in the foreground, the toast won't be displayed at all. When I remove the wp:Param field from the notification, the toast will appear again, so I'm assuming WP8 doesn't like me putting JSON data in the wp:Param field.

How can I send my data and still have the toast appear if my app isn't in the foreground.

1

1 Answers

0
votes

The value provided in wp:Param has to look like a URL for Windows Phone to process it and display the toast.

The valid formats are:

  • /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 "?".