Android popping to Root when app resumed

I am using NavigationPages in App. From Root I PushAsync to new page which allows to select Folder. When you return to the app, it pops back to the Root Page. Does the same when minimize the app and go back to it. Works fine on IOS though. Am I forgetting something for Android?

Best Answer

Answers

  • dominion66dominion66 Member

    Thanks for your reply. I paid closer attention to the lifecycle and noticed that on Android when the app is resumed it calls the OnAppearing method on the root page first (Which I had redirecting) before the Current Pages OnAppearing. On IOS it only calls the OnAppearing on the current page.

  • JohnHardmanJohnHardman GBUniversity mod

    @dominion66 said:
    Thanks for your reply. I paid closer attention to the lifecycle and noticed that on Android when the app is resumed it calls the OnAppearing method on the root page first (Which I had redirecting) before the Current Pages OnAppearing. On IOS it only calls the OnAppearing on the current page.

    Wherever possible, I would advise only using OnAppearing and OnDisappearing for wiring/unwiring event handlers, subscribing/unsubscribing to messages, etc. That way, you don't get unexpected behavior caused by slight differences in when they are called on different platforms.

Sign In or Register to comment.