2

I try the sharedPreferences option and works when you don't switch off the tablet or the phone.. in the moment that you turn off the phone all the variables are deleted.

I must save those variables always. But momently, in my present solution, I can't put it to initialized, the user's could have different variable. I must initialized with the last session variables.

How could I do that?

Zior
  • 31
  • 2
  • what? when i save in SharedPreferences, they stay there until the app is uninstalled or I do delete them values by myself... You´re doing something wrong... – eduyayo May 19 '15 at 11:26
  • 1
    please have a look at http://stackoverflow.com/questions/11776612/android-sharedpreferences-after-reboot-device ... it might help – Mithun May 19 '15 at 11:27
  • Have You checked my ans ..is it usefull??? – Tufan May 19 '15 at 11:59
  • Yes! thanks million! all is working perfectly. Now I have another questions. Do you know if it is able to save two kinds of sharePreference variable? What I mean, imagine that I want to save the user details and on the other hand what the user add to the app. But i cant do it in the same variable. – Zior May 20 '15 at 07:50

0 Answers0