I can add data to parse when I'm offline, but my app will check if the user is logged in when I turn it on. If I'm offline the app won't turn on. How to remember the last user on the device when I'm offline?
Asked
Active
Viewed 91 times
0
-
Store it in shared preferences? – Gerald Schneider Nov 19 '15 at 14:13
1 Answers
0
In your main activity make a change in onStop()
or onDestroy()
, getting the SharedPreferences and saving data in it. In onCreate()
method try to obtain your values from SharedPreferences.
Follow this link for more information about SharedPreferences and how to use it
How do I get the SharedPreferences from a PreferenceActivity in Android?