Skip to content

Conversation

@ogunoz
Copy link

@ogunoz ogunoz commented Feb 20, 2017

Hey,
The conversion between JSON string and Java Objects are easy using com.google.gson.Gson.
I added two methods to your class that make saving and getting Java Objects to your SecurePreferences possible.
// Usage
// Put
SecurePreferences preferences = new SecurePreferences(context, "my-preferences", "SometopSecretKey1235", true);
preferences.put("someKey", anObject);
// Get
AnObject anObject = preferences.getObject("someKey", AnObject.class);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant