I want to download image on firebase storage in android app.
this is my image
I try this but it is not working
storageR
To download a file, first create a Cloud Storage reference to the file you want to download.
You can create a reference by appending child paths to the storage root, or you can create a reference from an existing gs:// or https:// URL referencing an object in Cloud Storage.
// Create a storage reference from our app
StorageReference storageRef = storage.getReference();
// Create a reference with an initial file path and name
StorageReference pathReference = storageRef.child("images/stars.jpg");
images is the child of root.
storageRef.child("images/stars.jpg").getDownloadUrl().addOnSuccessListener(new OnSuccessListener() {
@Override
public void onSuccess(Uri uri) {
// Got the download URL for 'users/me/profile.png'
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
}
});