How to retain state of an application in xamarin forms (Android) ?

AmitKumar.8556AmitKumar.8556 ✭✭INMember ✭✭
edited June 2016 in Xamarin.Forms

Hi all,
While working on a cross platform application I encountered a problem :

Its a multiple page application, suppose I am currently on page 5 and locking the screen, when I unlock the screen I am navigated back to splash screen page or some other page. The page I was working on before locking the screen never comes.

The same is happening whenever I am trying to upload any picture, after uploading it navigates to splash screen.
There are no such issues in iOS, I am facing this problem only in android.

Please suggest any solution for this problem.

Answers

  • AlessandroCaliaroAlessandroCaliaro ✭✭✭✭✭ ITMember ✭✭✭✭✭

    You can save your state in Application.Current.Properties (if I remember the name correctly) and in OnResume restore the state of your app

Sign In or Register to comment.