Ejemplo n.º 1
0
  private void setContactInfo(String content) {
    final FeedbackAgent fb = new FeedbackAgent(mContext);
    UserInfo userInfo = fb.getUserInfo();
    if (userInfo == null) {
      userInfo = new UserInfo();
    }
    Map<String, String> contact = userInfo.getContact();
    if (contact == null || contact.isEmpty()) {
      contact = new HashMap<String, String>();
    }
    int position = spContactType.getSelectedItemPosition();
    contact.put(keys[position], content);
    userInfo.setContact(contact);
    fb.setUserInfo(userInfo);

    new Thread(
            new Runnable() {
              @Override
              public void run() {
                fb.updateUserInfo();
              }
            })
        .start();
    types[position] = content;
    showContactInfo();
  }
Ejemplo n.º 2
0
 public void sendInfoToUmeng(String content) {
   String contact =
       currentAccount.getPhone() == null ? currentAccount.getEmail() : currentAccount.getPhone();
   UserInfo info = new UserInfo();
   Map<String, String> map = info.getContact();
   if (map == null) map = new HashMap<String, String>();
   map.put("plain", contact);
   info.setContact(map);
   agent.setUserInfo(info);
   defaultConversation = agent.getDefaultConversation();
   defaultConversation.addUserReply(content);
   defaultConversation.sync(this);
 }