package com.xxxx.app.common.util;
import android.content.Context;
import android.content.SharedPreferences;
public class SharedPreferencer
{
private final static String PREFS_CACHE = "prefs_workbench";
// --------------------------------------------------------------
public static void setCheckUpdateTime(Context context, long value)
{
SharedPreferences sp = context.getSharedPreferences(PREFS_CACHE, 0);
SharedPreferences.Editor editor = sp.edit();
editor.putLong("checkUpdateTime", value);
editor.commit();
}
public static long getCheckUpdateTime(Context context)
{
SharedPreferences sp = context.getSharedPreferences(PREFS_CACHE, 0);
return sp.getLong("checkUpdateTime", 0);
}
}
SharedPreferencer工具类
最新推荐文章于 2019-06-22 16:40:40 发布