3
votes

I have an application with the following pages:

  • Login
  • Menu
  • Chat

when I start the application the order of the pages is the following Login -> Menu -> Chat

But... when my application is not running and I get a push notification I want to navigate the user directly to the chat window(and do the login in the background, without the login page). My problem comes at this point, because when I press back I would like to go to the menu page, and when pressing back again I want to go to the login page.

I dont want to navigate the user through the login and menu page before going to chat if he clicks a push notification.

Any suggestions?

1
in what are your pages nested? - EaterOfCode
PhoneApplicationPage.. or what do you mean by that question? - Igor Meszaros
you can navigate through the login and the menu page in the load? - EaterOfCode
I could, but it would look stupid that I jump trough 2 pages before getting where I want, and time consuming as well. unless there is a way to load those pages without the user noticing that. - Igor Meszaros
do it before the initializeComponent then nothing is added and they dont see it or you can hang events on the Back button on each page - EaterOfCode

1 Answers

1
votes

One solution I can think of would be that you remenmber you came to the Chat page from a push notification. Then when Back key is pressed on the Chat page you you catch the event (OnBackKeyPress) and call NavigationContext.NavigateTo(MainPage) by yourself. You can do the same same on the Menu page.