コード例 #1
0
  public boolean isRobotMenuMessage(EMMessage message) {

    try {
      JSONObject jsonObj = message.getJSONObjectAttribute(Constant.MESSAGE_ATTR_ROBOT_MSGTYPE);
      if (jsonObj.has("choice")) {
        return true;
      }
    } catch (Exception e) {
    }
    return false;
  }
コード例 #2
0
 public String getRobotMenuMessageDigest(EMMessage message) {
   String title = "";
   try {
     JSONObject jsonObj = message.getJSONObjectAttribute(Constant.MESSAGE_ATTR_ROBOT_MSGTYPE);
     if (jsonObj.has("choice")) {
       JSONObject jsonChoice = jsonObj.getJSONObject("choice");
       title = jsonChoice.getString("title");
     }
   } catch (Exception e) {
   }
   return title;
 }