コード例 #1
0
 public String getLoginUserCookie() {
   StringBuffer SESSIONID = new StringBuffer();
   SharedPreferences sp = getInstance().getSharedPreferences("token_info", 0);
   if (!StringUtils.isEmpty(sp.getString("ACCESS_TOKEN", ""))) {
     SESSIONID.append("ACCESS_TOKEN=" + sp.getString("ACCESS_TOKEN", ""));
   }
   SESSIONID.append(";");
   if (!StringUtils.isEmpty(sp.getString("ACCESS_KEY", ""))) {
     SESSIONID.append("ACCESS_KEY=" + sp.getString("ACCESS_KEY", ""));
   }
   return SESSIONID.toString();
 }
コード例 #2
0
 public KzxTokenBean getKzxTokenBean() {
   KzxTokenBean kzxTokenBean = new KzxTokenBean();
   SharedPreferences sp = getInstance().getSharedPreferences("kzx_token_info", 0);
   if (!StringUtils.isEmpty(sp.getString("memberId", ""))) {
     kzxTokenBean.setAccountName(sp.getString("accountName", ""));
     kzxTokenBean.setCompanyName(sp.getString("companyName", ""));
     kzxTokenBean.setGrowUp(sp.getInt("growUp", 0));
     kzxTokenBean.setMedalCount(sp.getInt("medalCount", 0));
     kzxTokenBean.setMemberIcon(sp.getString("memberIcon", ""));
     kzxTokenBean.setMemberId(sp.getString("memberId", ""));
     kzxTokenBean.setEncryptMemberId(sp.getString("encryptMemberId", ""));
     kzxTokenBean.setMemberName(sp.getString("memberName", ""));
     kzxTokenBean.setPhone(sp.getString("phone", ""));
     kzxTokenBean.setEmail(sp.getString("email", ""));
     kzxTokenBean.setDepartment(sp.getString("department", ""));
     kzxTokenBean.setLeader(sp.getString("leader", ""));
     kzxTokenBean.setLeaderName(sp.getString("leaderName", ""));
     kzxTokenBean.setClientIds(sp.getString("clientIds", "[]"));
     kzxTokenBean.setAccountId(sp.getString("accountId", ""));
     kzxTokenBean.setEncryptClientIds(sp.getString("encryptClientIds", "[]"));
     kzxTokenBean.setNoReadMessageNum(sp.getString("noReadMessageNum", "0"));
     kzxTokenBean.setIsSendSms(sp.getInt("isSendSms", 1));
   }
   return kzxTokenBean;
 }
コード例 #3
0
 public String getACCESS_KEY() {
   StringBuffer SESSIONID = new StringBuffer();
   SharedPreferences sp = getInstance().getSharedPreferences("token_info", 0);
   if (!StringUtils.isEmpty(sp.getString("ACCESS_KEY", ""))) {
     SESSIONID.append(sp.getString("ACCESS_KEY", ""));
   }
   return SESSIONID.toString();
 }