I am doing this Android Project in which i want help in retrieving all the URLs which are stored in Firebase Storage and display them all in imageview. The Problem with the given code is that it only fetches one download url.In what way can i get all the URLs for all the images stored in Firebase. In short: There is one activity in which I am saving the images to firebase and in other i want to retrieve all the images in Imageview.In what way i can do it ? Thanks
if(requestCode== GALLERY_INTENT && resultCode== RESULT_OK)
{
mProgress.setMessage("Uploading....");
mProgress.show();
Uri uri =data.getData();
StorageReference filepath = mStorage.child("Photos").child(uri.getLastPathSegment());
filepath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
mProgress.dismiss();
Uri downloadUri = taskSnapshot.getDownloadUrl();
Picasso.with(MainActivity.this).load(downloadUri).fit().centerCrop().into(mImageView);
Toast.makeText(MainActivity.this,"Upload done",Toast.LENGTH_LONG).show();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(MainActivity.this,"Upload failed",Toast.LENGTH_LONG).show();
}
});
}