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; }
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; }