I've come across a very strange problem. I've implemented push notifications inside my application and it works fine, but only If I don't send a param with the push notification. My application is a Windows Phone 8 Application.
For some reason the push notifications with the param won't arrive on my phone, but without the param they do. I've tried a lot if "inputs" to check if it was because it wasn't a valid uri, string, etc, but nothing happens.
Even stranger is that the response from the Microsoft server says that it is delivered.
HTTP/1.1 200 OK Cache-Control: private Server: Microsoft-IIS/7.5 X-DeviceConnectionStatus: Connected X-NotificationStatus: Received X-SubscriptionStatus: Active X-MessageID: 00000000-0000-0000-0000-000000000000 ActivityId: 381e48cc-7a1d-4076-979d-953a622bfc7d X-Server: DB3MPNSM009 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Fri, 06 Sep 2013 19:17:32 GMT Content-Length: 0
Send, but not receiving:
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>Title test</wp:Text1>
<wp:Text2>Message test</wp:Text2>
<wp:Param>/Page2.xaml</wp:Param>
</wp:Toast>
</wp:Notification>
Send, but not receiving
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>Title test</wp:Text1>
<wp:Text2>Message test</wp:Text2>
<wp:Param>/Page2.xaml?id=34</wp:Param>
</wp:Toast>
</wp:Notification>
Send and receiving
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>Title test</wp:Text1>
<wp:Text2>Message test</wp:Text2>
<wp:Param></wp:Param>
</wp:Toast>
</wp:Notification>
I've have no clue any more what the problem could be. I hope someone can help me out.
Regards,
Tom
The answer could be in here http://msdn.microsoft.com/en-us/library/windows/apps/jj662938(v=vs.105).aspx... I had the same issue when I was using multiple query string parameters.
I did ?something=value&somethingelse=value
(failing)
Then I noticed the &
was encoded using &
in the example.
So when I changed it to ?something=value&somethingelse=value
, the notification was successfully received.