use of com.funstill.kelefun.config.AccountStore in project keleFanfou by kelefun.
the class LoginActivity method saveAccount.
private void saveAccount(OAuthToken auth, UserInfo info) {
AccountStore store = new AccountStore(this);
store.saveAccount(auth, info);
}
use of com.funstill.kelefun.config.AccountStore in project keleFanfou by kelefun.
the class StartActivity method isLogin.
// 启动app时判断是否已登录
private boolean isLogin() {
AccountStore store = new AccountStore(this);
AccountInfo accountInfo = store.readAccount();
return accountInfo.isVerified();
}
use of com.funstill.kelefun.config.AccountStore in project keleFanfou by kelefun.
the class AccountService method saveUserInfo.
public void saveUserInfo(Context mContext) {
Retrofit retrofit = BaseRetrofit.retrofit(new SignInterceptor());
AccountApi api = retrofit.create(AccountApi.class);
Call<UserInfo> call = api.verifyCred();
try {
UserInfo userInfo = call.execute().body();
new AccountStore(mContext).saveAccount(userInfo);
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations