سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top