注册

Android,环信3.1收到图片信息后,得不到缩略图,必须下载之后才能显示,这是什么问题

我在收到图片后,用Bitmap去获取接收这个图片,我再没下载的情况下,本地内存卡里没有图片,除非下载这个图片之后,内存卡里才会有缩略图和原图。imgBody.getThumbnailUrl()这个方法得到的路径,得不到缩略图。请问有什么解决办法吗?以前不下载的时候,就可以得到缩略图的。
已邀请:
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();
    }

要回复问题请先登录注册