public static void Update(Context context, AccessToken token) { BaseShared.Instance(context, Tag).SetString(KeyAccessToken, token.access_token); BaseShared.Instance(context, Tag).SetString(KeyTokenType, token.token_type); BaseShared.Instance(context, Tag).SetInt(KeyExpiresIn, token.expires_in); BaseShared.Instance(context, Tag).SetBool(KeyIsIdentityUser, token.IsIdentityUser); BaseShared.Instance(context, Tag).SetDateTime(KeyRefreshTime, token.RefreshTime); }
public static AccessToken GetAccessToken(Context context) { return(new AccessToken() { access_token = BaseShared.Instance(context, Tag).GetString(KeyAccessToken, ""), token_type = BaseShared.Instance(context, Tag).GetString(KeyTokenType, ""), expires_in = BaseShared.Instance(context, Tag).GetInt(KeyExpiresIn, 0), IsIdentityUser = BaseShared.Instance(context, Tag).GetBool(KeyIsIdentityUser, false), RefreshTime = BaseShared.Instance(context, Tag).GetDateTime(KeyRefreshTime), }); }
public static bool GetWiFi(Context context) { return(BaseShared.Instance(context, Tag).GetBool(KeyWiFi, false)); }
public static void SetWiFi(Context context, bool wifi) { BaseShared.Instance(context, Tag).SetBool(KeyWiFi, wifi); }