Server端 如果获取 从终端发送过来的 binaryContent 内容

电火扇 3天前 45

public MessagePayload encode() {
        MessagePayload payload = super.encode();
        payload.searchableContent = content;
        payload.mentionedType = mentionedType;
        payload.mentionedTargets = mentionedTargets;
        try {
            JSONObject objWrite = new JSONObject();
            objWrite.put("content",content);
            objWrite.put("name",name);
            objWrite.put("gender",gender);
            objWrite.put("jobStatus",jobStatus);
            objWrite.put("location",location);
            objWrite.put("company",company);
            objWrite.put("department",department);
            objWrite.put("position",position);
            payload.binaryContent = objWrite.toString().getBytes();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return payload;
    }

安卓端通过这种方式发送消息,需要服务端读取binaryConten的内容,服务端要如何获取? 有没有实例代码?

最新回复 (1)
  • x86 3天前
    引用 2
    请看这儿:https://bbs.wildfirechat.cn/thread-2421.htm
返回