On Android and iOS everything is working fine. It also works if the WP application is open when the push notification is received. Where I'm having problems is when the app is not running and the toast is tapped, because the notification callback is never fired. This is not unexpected, because I know that's normal behavior of WP.
What I'm trying to do instead is to set the launch page(LandingUri) to that page. So when the user taps the toast when the app is not running, the app should open directly to that page. I'm sending the message as specified in the documentation
When I inspect the received notification in the callback it looks like this:
I have tried to set the LandingUri in multiple different ways, for example:
I'm using Backbone Marionette router, so that's why the url is set like this: #api/. the-page
is the dynamic part that's defining where to land. The problem is, it never lands on the page I defined. Most of the time it lands on the index page and sometimes the app crashes before it even starts. No error is received, it just shuts down.
I'm a total noob when it comes to Windows Phone, so my question is: How should I set the LandingUri in the object?
Or am I doing something else wrong?
Alternatively, is there any other way
to achieve the behavior I want, which is: navigating to a specific page inside my application based on an uri received in a push notification (after the toast is tapped when the application is not running)?
For additional information, I'm using Phonegap Build. I'm also more than happy to provide more info if needed. I would be very grateful if anyone could help me.