Android 从本地服务端导入图片消息到数据库,图片不显示
导入方法EMMessage message = EMMessage.createSendMessage(EMMessage.Type.IMAGE);
message.setChatType(ChatType.Chat);
ImageMessageBody body = new ImageMessageBody();
body.setFileName("test1.jpg");
body.setRemoteUrl("https://a1.easemob.com/easemob-demo/chatdemoui/chatfiles/65e54a4a-fd0b-11e3-b821-ebde7b50cc4b");
body.setThumbnailUrl("https://a1.easemob.com/easemob-demo/chatdemoui/chatfiles/496334fa-f53f-11e3-9eb7-4fbb06ff7876");
body.setSecret("DRGM8OZrEeO1vafuJSo2IjHBeKlIhDp0GCnFu54xOF3M6KLr");
body.setThumbnailSecret("DRGM8OZrEeO1vafuJSo2IjHBeKlIhDp0GCnFu54xOF3M6KLr");
message.addBody(body);
message.setMsgId("90954605390795632");
message.setMsgTime(Long.valueOf("1438745720901"));
message.setFrom("test1");
message.setTo("test2");
EMChatManager.getInstance().importMessage(message, false);
message.setChatType(ChatType.Chat);
ImageMessageBody body = new ImageMessageBody();
body.setFileName("test1.jpg");
body.setRemoteUrl("https://a1.easemob.com/easemob-demo/chatdemoui/chatfiles/65e54a4a-fd0b-11e3-b821-ebde7b50cc4b");
body.setThumbnailUrl("https://a1.easemob.com/easemob-demo/chatdemoui/chatfiles/496334fa-f53f-11e3-9eb7-4fbb06ff7876");
body.setSecret("DRGM8OZrEeO1vafuJSo2IjHBeKlIhDp0GCnFu54xOF3M6KLr");
body.setThumbnailSecret("DRGM8OZrEeO1vafuJSo2IjHBeKlIhDp0GCnFu54xOF3M6KLr");
message.addBody(body);
message.setMsgId("90954605390795632");
message.setMsgTime(Long.valueOf("1438745720901"));
message.setFrom("test1");
message.setTo("test2");
EMChatManager.getInstance().importMessage(message, false);
没有找到相关结果
已邀请:
3 个回复
zhangnan
bigggge
环信技术支持中心