@Override
 public void onResponse(String s) {
   LogUtils.e("onResponse: " + s);
   JSONObject jsonObject = JSON.parseObject(s);
   if (jsonObject != null
       && jsonObject.getString("errmsg") != null
       && jsonObject.getString("errmsg").equals("ok")) {
     Utils.makeEventToast(this, "发生邀请成功", false);
   } else {
     Utils.makeEventToast(this, "发生邀请失败", false);
   }
   finish();
 }
Esempio n. 2
0
  public void parse(String[] result, Session session, String commandType, boolean isFilterMyself) {
    this.size = result[1];
    if (size.equals("0")) {
      this.friendsList = new ArrayList<FriendInfo>(0);
    } else {
      this.friendsList = new ArrayList<FriendInfo>(Integer.valueOf(size));
      int index = 2;
      for (int i = 0; i < Integer.valueOf(size); i++) {
        FriendInfo item = new FriendInfo();
        item.setUid(result[index++]);
        item.setUserName(result[index++]);
        item.setUserAvatar(result[index++]);
        item.setUserStatus(result[index++]);
        item.setLastTalkTime(result[index++]);
        item.setOnLineType(result[index++]);

        if (commandType.equals(Constants.IM_CMD_GET_GROUP_USER)) {
          item.setManagerFlag(result[index++]);
          item.setCreatorFlag(result[index++]);
          item.setMuteFlag(result[index++]);
          item.setJoinTime(result[index++]);
        }

        item.setIdentity(Utils.getIdentity(session));
        updateSortKey(item);
        if (!isFilterMyself) {
          friendsList.add(item);
          if (item.getUid().equals(session.getIds())) {
            //                        session.setMySelfInfo(item);
          }
        } else {
          if (!item.getUid().equals(session.getIds())) {
            friendsList.add(item);
          } else {
            //                        session.setMySelfInfo(item);
          }
        }
      }
    }
  }