-
Notifications
You must be signed in to change notification settings - Fork 8
Get Object
Hendra Permana edited this page May 6, 2017
·
1 revision
.getObject(object)
try {
Profile profile = (Profile) gsonSharedPreferences.getObject(new Profile());
Log.i(TAG, profile.getUserName());
} catch (ParsingException e) {
e.printStackTrace();
}
.getJsonObject(object)
try {
JSONObject object = gsonSharedPreferences.getJsonObject(new Profile());
} catch (ParsingException e) {
e.printStackTrace();
}
. getJsonObjectString(object)
try {
Log.i(TAG, gsonSharedPreferences.getJsonObjectString(new Profile()));
} catch (ParsingException e) {
e.printStackTrace();
}