你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
搜索问题、话题或人...
输入关键字进行搜索
搜索:
问题
精选文章
开源项目
视频教程
活动
· · ·
帮助
登录
注册
缩略图不能显示
Android,环信3.1收到图片信息后,得不到缩略图,必须下载之后才能显示,这是什么问题
我在收到图片后,用Bitmap去获取接收这个图片,我再没下载的情况下,本地内存卡里没有图片,除非下载这个图片之后,内存卡里才会有缩略图和原图。imgBody.getThumbnailUrl()这个方法得到的路径,得不到缩略图。请问有什么解决办法吗?以前不下载的时候,就可以得到缩略图的。
没有找到相关结果
已邀请:
与内容相关的链接
提交
1 个回复
[已注销]
EaseChatRowImage这个类中:protected void onSetUpView() {
imgBody = (EMImageMessageBody) message.getBody();
// 接收方向的消息
if (message.direct() == EMMessage.Direct.RECEIVE) {
if (imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.DOWNLOADING ||
imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.PENDING) {
imageView.setImageResource(R.drawable.ease_default_image);
setMessageReceiveCallback();
} else {
progressBar.setVisibility(View.GONE);
percentageView.setVisibility(View.GONE);
imageView.setImageResource(R.drawable.ease_default_image);
String thumbPath = imgBody.thumbnailLocalPath();
if (!new File(thumbPath).exists()) {
// 兼容旧版SDK收到的thumbnail
thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
}
showImageView(thumbPath, imageView, imgBody.getLocalUrl(), message);
}
return;
}
String filePath = imgBody.getLocalUrl();
String thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
showImageView(thumbPath, imageView, filePath, message);
handleSendMessage();
}
要回复问题请先
登录
或
注册
发起人
乔衰
问题状态
最新活动:
2016-04-18 22:03
浏览:
4120
关注:
2
人
1 个回复
[已注销]
imgBody = (EMImageMessageBody) message.getBody();
// 接收方向的消息
if (message.direct() == EMMessage.Direct.RECEIVE) {
if (imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.DOWNLOADING ||
imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.PENDING) {
imageView.setImageResource(R.drawable.ease_default_image);
setMessageReceiveCallback();
} else {
progressBar.setVisibility(View.GONE);
percentageView.setVisibility(View.GONE);
imageView.setImageResource(R.drawable.ease_default_image);
String thumbPath = imgBody.thumbnailLocalPath();
if (!new File(thumbPath).exists()) {
// 兼容旧版SDK收到的thumbnail
thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
}
showImageView(thumbPath, imageView, imgBody.getLocalUrl(), message);
}
return;
}
String filePath = imgBody.getLocalUrl();
String thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
showImageView(thumbPath, imageView, filePath, message);
handleSendMessage();
}