如何从firebase获取网址

时间:2018-02-14 10:58:40

标签: android firebase firebase-storage

我的代码:

mStorageRef.child("image/pizza.jpg").getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
                    @Override
                    public void onSuccess(Uri uri) {
                        // Got the download URL for 'users/me/profile.png'
                        System.out.println(uri.toString() + "!!!!!!");
                    }
                }).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception exception) {
                        // Handle any errors
                    }
                });

但它只打印:

  

https://console.firebase.google.com/u/1/project/e-commerce-ddd1c/database/e-commerce-ddd1c/data

我不明白如何获取此网址: enter image description here

0 个答案:

没有答案