Skip to content

Android: Saving Application Preferences

by peterdk on April 16th, 2010

I was wondering if the Preferences mechanism of Android (SharedPreferences) would save it’s data to disk or that it would remain in memory and thus get lost on reboot.

Fortunately, I can tell you that it indeeds saves to some persistent storage: I rebooted my G1 and it retrieved the values I stored!

Don’t forget to call: editor.commit() when storing preferences or they will indeed get lost.

Comments are closed.