Welcome to the Treehouse Community
Looking to learn something new?
Save the app state when the app is swiped left or right from the overview screen or recent apps list.
When I swipe the app, that I am logged into, from overview screen or recent apps list the app closes completely and I have to log in to the app again. How to prevent the log in process again and save the state of the application when accessed again?
For example: Open a facebook mobile app in your android phone. Go to the overview screen or recent apps list screen, you will see all the apps you have opened and among those app you will see facebook app as well. When you swipe the facebook app either left or right, app is no longer displayed in the overview screen or recent apps list. Now open the facebook app, you are already logged in and you state is saved.
How do I achieve the same behavior in my app?
Any suggest is highly appreciated!
I was able to get what i wanted, which is a user should be able to auto login to the app if the app is removed from the recent apps list.
I used sharedpreference for it and it works like a charm.
If anyone needs help or wants to know more about it, please comment and I will be more than happy to share my experience with you.