Reputation: 8917
If an application stores something using SharedPreferences.Editor
's methods, does it survive a device reboot?
Upvotes: 1
Views: 52
Reputation: 1
Yeah.. Though shared preference data are temporary and not a recommendation for saving long term or complex data but it values can only be cleared using Editor.clear ones commit() or apply()
Upvotes: 0
Reputation: 1006819
If you commit()
or apply()
the changes that you make in the SharedPreferences.Editor
, then yes. SharedPreferences
are saved in an XML file, and that file will survive an ordinary reboot.
Upvotes: 1