0

What's the maximum size allowed for an android shared preference file. I want to include some logs in it for my troubleshooting.

As, I would like to create two shared preference files one for logging (Last error occurred and time) and other for app preferences.

Maddy
  • 3,726
  • 9
  • 41
  • 55

1 Answers1

1

So if you have more than 1.42 MB data size to save its better to save use SQLite database. According to developer.android.com: If you have a relatively small collection of key-values that you'd like to save, you should use the SharedPreferences APIs.But Shared preference is stored in /data/data/[package_name]/shared_prefs/[app name].xml, I think there's no limit as per android architecture.

HeinerTheBest
  • 201
  • 2
  • 3