static void setLaunchTimes(Context context, int launchTimes) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putInt(PREF_KEY_LAUNCH_TIMES, launchTimes); editor.apply(); }
/** * Set agree flag about show dialog.<br/> * If it is false, rate dialog will never shown unless data is cleared. * * @param context context * @param isAgree agree with showing rate dialog */ static void setAgreeShowDialog(Context context, boolean isAgree) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putBoolean(PREF_KEY_IS_AGREE_SHOW_DIALOG, isAgree); editor.apply(); }
/** * Set agree flag about show dialog.<br/> * If it is false, rate dialog will never shown unless data is cleared. * * @param context context * @param isAgree agree with showing rate dialog */ static void setAgreeShowDialog(Context context, boolean isAgree) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putBoolean(PREF_KEY_IS_AGREE_SHOW_DIALOG, isAgree); editor.apply(); }
static void setLaunchTimes(Context context, int launchTimes) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putInt(PREF_KEY_LAUNCH_TIMES, launchTimes); editor.apply(); }
/** * Clear data in shared preferences.<br/> * * @param context context */ static void clearSharedPreferences(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.remove(PREF_KEY_INSTALL_DATE); editor.remove(PREF_KEY_LAUNCH_TIMES); editor.apply(); }
static void setInstallDate(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putLong(PREF_KEY_INSTALL_DATE, new Date().getTime()); editor.apply(); }
/** * Clear data in shared preferences.<br/> * * @param context context */ static void clearSharedPreferences(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.remove(PREF_KEY_INSTALL_DATE); editor.remove(PREF_KEY_LAUNCH_TIMES); editor.apply(); }
static void setInstallDate(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.putLong(PREF_KEY_INSTALL_DATE, new Date().getTime()); editor.apply(); }
static void setRemindInterval(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.remove(PREF_KEY_REMIND_INTERVAL); editor.putLong(PREF_KEY_REMIND_INTERVAL, new Date().getTime()); editor.apply(); }
static void setRemindInterval(Context context) { SharedPreferences.Editor editor = getPreferencesEditor(context); editor.remove(PREF_KEY_REMIND_INTERVAL); editor.putLong(PREF_KEY_REMIND_INTERVAL, new Date().getTime()); editor.apply(); }