我希望能够从我的S3存储桶中获取图像,并使用Glide或Picasso将该图像加载到ImageView中(我不想将该图像下载到我的手机上)。
目前我有以下代码:
downloadButton = (Button) findViewById(R.id.cognito_s3DownloadButton);
downloadButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
File file = new File(Environment.getExternalStorageDirectory().toString() + "/" + "fromAWS");
observer = transferUtility.download("zivit-card-images","image1", file);
Glide.with(getBaseContext()).load("image in byes? or url?").centerCrop().into(myImageView);
}
});
再次强调,我该如何从S3中检索图像并将其插入到ImageView中?
transferUtility.download()
,这个文件就是转移实用程序将要下载 S3 对象的文件。 - Karthik