0

I have a simple windows phone 8 project that consists in receiving notifications from a server, and displays its content on a MainPage.xaml.

The notification has a title, a subject and a content. I have faced a strange issue on Nokia devices that have a notification center, where you can see all the received notifications which are not opened yet. I have noticed that those notification are separated in 2 clickable lines:

Example of the notification center on Nokia device

  • The first line (icon and application name) opens the application.
  • The second line (notification title and subject) opens the application with the notification content.

During my tests, I sometimes missclicked on the first line, which opens my application without the notification's content (and so did not understood what the hell was happening). As I am not a Windows Phone user, can you confirm this is a common behavior on Nokia devices ? Or is there a way to always open the application with the notification content, even if you clicked on the first line ?

hico
  • 1,850
  • 1
  • 19
  • 28
  • This is not about "Nokia devices" but about Windows Phone 8.1. Yes it's a common behavior. I don't know the answer of your last question, but it probably involves programmatically going through the pending notifications and checking which one is the latest – Kevin Gosse Apr 09 '15 at 09:05
  • For instance, by using the `History` property of the `ToastNotificationManager`. You can find a sample here: https://code.msdn.microsoft.com/windowsapps/WindowsPhone-81-Action-4fef1501 – Kevin Gosse Apr 09 '15 at 09:10
  • Thank you for the clarification, but I must support WindowsPhone 8.0, and the ToastNotificationManager is only available from the 8.1 version. Moreover, my notifications are coming from a server, not creating by the app itself, as the sample does. So I'm not sure I can modify this behavior. – hico Apr 09 '15 at 09:56
  • Since the notification manager is only available since WP8.1, I'm not sure there's a way to handle properly your case with a WP8.0 binary. You should try making a simple custom UriMapper and put a breakpoint in it to see if your app is launched with custom parameters when the user taps on the notification title. If not, I doubt there's a way. – Kevin Gosse Apr 09 '15 at 10:00
  • Yes, I already done that by printing the argument e.Uri.ToString. When I clicked on the title, there is only the /MainPage.xaml?. When I click on the notificaton, there is my parameter /MainPage.xaml?param1=content. The only way I can think of is that I may miss something on server side when I construct my notification in XML (maybe there is an hidden param that should get around this behavior). – hico Apr 09 '15 at 10:11

0 Answers0