问题
I'm trying to download image from storage inside of ViewHolder, but it doesn't work:
FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference storageReference = storage.getReference();
StorageReference imgRef = storageReference.child("11325404_436219506581300_875224883_a.jpg");
Glide.with(context)
.using(new FirebaseImageLoader())
.load(imgRef)
.into(imageView);
When I use uri instead of FirebaseImageLoader everything works fine:
Glide.with(context)
.load(uri)
.centerCrop()
.into(imageView)
What could be a reason for that?
Update: I've tried to add this code and it shows me right links to images in storage
storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Log.v(TAG, String.valueOf(uri));
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
}
});
来源:https://stackoverflow.com/questions/43829591/firebaseimageloader-doesnt-download-image