Reputation: 185
I want to create session management in android for more then one activity
.
i read session management on this site http://www.androidhive.info/2012/08/android-session-management-using-shared-preferences/
how to create above code for more then one Activity
? From above tutorial i can understand for one activity only.
Upvotes: 0
Views: 132
Reputation: 2839
You can use the same logic explained in that link. While using Activities, save the preference data(logged in or not boolean etc) when user leaves or enter the activity class. Like in onPause method.
Upvotes: 1