0

In my app I have a strange and annoying "bug". The "bug" makes my app refuse to load sharedPreferences. In other parts of my app I use one or two SharedPreferences with good luck and no bugs. But when I try to handel about 75 of them they seem to be gone.

I do not know where to start debugging to find out why. Is it my low spec phone or some kind of overload that causes this problem?

Magakahn
  • 498
  • 9
  • 31
  • SharedPreferences is used to store small data like login details or mailid or other pass and that only for single user. – Padma Kumar Jul 18 '12 at 14:58
  • I got very few sharedPreferences, but I am unable to load them if I use to many. – Magakahn Jul 18 '12 at 14:59
  • see http://stackoverflow.com/a/3199961/1289716 and this http://developer.android.com/reference/java/util/prefs/Preferences.html#MAX_VALUE_LENGTH – MAC Jul 18 '12 at 15:03
  • @Magakahn every time clear it and commit it while saving. – Padma Kumar Jul 18 '12 at 15:43
  • possible duplicate of [Load SharedPreference efficient](http://stackoverflow.com/questions/11593473/load-sharedpreference-efficient) – taxeeta Jul 24 '13 at 03:36

1 Answers1

0

Take a look here: http://androidresearch.wordpress.com/2012/03/31/writing-and-reading-from-sharedpreferences/ But I believe in this case it will be more appropriate to store the data in a database.

Andy Res
  • 15,963
  • 5
  • 60
  • 96