/** * Sets whether the device was successfully registered in the server side. * * @param flag True if registration was successful, false otherwise * @param gcmId True if registration was successful, false otherwise */ public void setRegisteredOnServer(Location location, boolean flag, String gcmId) { Ln.d("Setting registered on server status as: " + flag); SharedPreferences.Editor editor = preferences.edit(); if (flag) { editor.putLong(makePushKey(location), new Date().getTime()); editor.putString(PROPERTY_REG_ID, gcmId); } else { editor.remove(PROPERTY_REG_ID); editor.remove(makePushKey(location)); } save(editor); }
public void setLocation(Location location) { save(preferences.edit().putString(LOCATION, mGson.toJson(location))); }
public void setNavDrawerLearned() { save(preferences.edit().putBoolean(NAV_DRAWER_LEARNED, true)); }
public void setLastPageDisclaimerUpdateTime(Language language, Location location) { save( preferences .edit() .putLong(makePageDisclaimerKey(language, location), new Date().getTime())); }
public void setLastLanguageUpdateTime(Location location) { save(preferences.edit().putLong(makeLocationKey(location), new Date().getTime())); }
public void setLastEventPageUpdateTime(Language language, Location location) { save(preferences.edit().putLong(makeEventPageKey(language, location), new Date().getTime())); }
public void setLastLocationUpdateTime() { save(preferences.edit().putLong(LAST_LOCATION_UPDATE, new Date().getTime())); }
public void setMultipleColumnsPortrait(boolean multipleColumns) { save(preferences.edit().putBoolean(MULTIPLE_COLUMNS_PORTRAIT, multipleColumns)); }
public void setMultipleColumnsLandscape(boolean multipleColumns) { save(preferences.edit().putBoolean(MULTIPLE_COLUMNS_LANDSCAPE, multipleColumns)); }
public void setSelectedPage(int pageId) { save(preferences.edit().putInt(CURRENT_PAGE, pageId)); }
public void saveCurrentColor(@ColorInt int color) { save(preferences.edit().putInt(CURRENT_COLOR, color)); }
public void setLanguage(Language language) { save(preferences.edit().putString(LANGUAGE, mGson.toJson(language))); }