Android, Picasso, Firebase Storage - Retrieve Image, Nothing is being showed on ImageView

时光怂恿深爱的人放手 提交于 2019-12-02 18:13:42

问题


I already tried using Glide.with(opDetails.this).using(new FirebaseImageLoader()).load(uri).into(imgPhoto1); but had some problems with .using(). I am now trying to use picasso. Althougt the compiler shows no error, no image is displayed to the ImageView and i cant understand why.

    storage = FirebaseStorage.getInstance();
    storageRef = storage.getReference();

    storageRef.child("images/4736af35-608d-4b97-95ba-029ef471c5eb.png").getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
        @Override
        public void onSuccess(Uri uri) {
            Picasso.with(opDetails.this).load(uri).into(imgPhoto1);

        }
    }).addOnFailureListener(new OnFailureListener() {
        @Override
        public void onFailure(@NonNull Exception exception) {

        }
    });
}

Update:

Firebase Storage Image

Storage Rules

Thanks in advance.


回答1:


Try this:-

storageRef.child("images/4736af35-608d-4b97-95ba-029ef471c5eb").getDownloadUrl().addOnSuccessListener....


来源:https://stackoverflow.com/questions/51448144/android-picasso-firebase-storage-retrieve-image-nothing-is-being-showed-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!