Hacker News new | ask | show | jobs
Serialise and deserialise any Java object to Shared Preferences in Android (github.com)
1 points by brad-curran 4753 days ago
1 comments

It's pretty simple to use.

Saving objects: Animal animal = new Animal("Lassie", "Dog"); DroidPrefs.instance(context).put("key", animal).apply();

Loading objects: Animal animal = DroidPrefs.instance(context).get("key", Animal.class);