如何使用 qiscus sdk 添加消息负载
How to add a message payload using qiscus sdk
我用 android qiscus sdk 开发了聊天功能。我对要在 QiscusComment.generateCustomMessage().
中实现的自定义负载消息有疑问
谁能帮帮我?
谢谢..
String message = "Survey Qiscus";
JSONObject payload = new JSONObject();
try {
payload.put("sticker_url", "https://res.cloudinary.com/qiscus/image/upload/fxwzBRPcdz/Bubble-Pup-Yup.gif");
payload.put("profile_url", "http://res.cloudinary.com/diufvqwbr/image/upload/v1507608923/logo_gb4lzy.png");
payload.put("title_survey", "Qiscus@ Selles Survey");
payload.put("date", "2017-10-29");
payload.put("link_url", "https://www.qiscus.com/");
} catch (JSONException e) {
e.printStackTrace();
}
QiscusComment comment = QiscusComment.generateCustomMessage(message, "survey", payload,
qiscusChatRoom.getId(), qiscusChatRoom.getLastTopicId());
您可以发送您的评论
发送Qiscus评论(评论);
您可以使用 JsonArrays 自定义您的消息负载。我希望它可以帮助你开发你的应用程序。
祝你好运!!
我用 android qiscus sdk 开发了聊天功能。我对要在 QiscusComment.generateCustomMessage().
中实现的自定义负载消息有疑问谁能帮帮我? 谢谢..
String message = "Survey Qiscus";
JSONObject payload = new JSONObject();
try {
payload.put("sticker_url", "https://res.cloudinary.com/qiscus/image/upload/fxwzBRPcdz/Bubble-Pup-Yup.gif");
payload.put("profile_url", "http://res.cloudinary.com/diufvqwbr/image/upload/v1507608923/logo_gb4lzy.png");
payload.put("title_survey", "Qiscus@ Selles Survey");
payload.put("date", "2017-10-29");
payload.put("link_url", "https://www.qiscus.com/");
} catch (JSONException e) {
e.printStackTrace();
}
QiscusComment comment = QiscusComment.generateCustomMessage(message, "survey", payload,
qiscusChatRoom.getId(), qiscusChatRoom.getLastTopicId());
您可以发送您的评论 发送Qiscus评论(评论);
您可以使用 JsonArrays 自定义您的消息负载。我希望它可以帮助你开发你的应用程序。
祝你好运!!