0

I don't know whether this is repeated question or not, but i didn't find any solution for my question.

I created a project in Firebase and in Storage section I added some folders and in that folders I placed 10 images in every folder.

Now what I want to do is,If I visit that particular (which has 10 images) I want to fetch all the 10 images, and display in RecyclerView.

FirebaseStorage storage;
storage = FirebaseStorage.getInstance();
    reference = storage.getReferenceFromUrl(getResources().getString(R.string.image_reference));
    Log.e(TAG, "onViewCreated: " + reference.child("folder1").getPath() );

In docs they said about download only one image at a time. But don't know how to display all the images in recyclerview.

Example : when you create your own API you will be sending all the json data, and in android we will be populating it in recyclerview.

But in Firebase how to achieve this. Suppose if I have 1000 Images in one folder, then how to use pagination in this scenario.

Please guys I anybody know , plz help me. Any kind of help is appreciated.

1
  • There is no API in Firebase Storage to list images. This means you'll need to use some other data sharing mechanism (such as the Firebase Database) to share the list of image locations. See stackoverflow.com/questions/37335102/… Commented Oct 31, 2016 at 16:22

1 Answer 1

1

You should keep a track(filename) of the files in the storage first. Then you can download all the files one by one. See official sample for storage here.

For pagination you should use database references.

Sign up to request clarification or add additional context in comments.

2 Comments

Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
I don't want users to download the images, I just want to display the images. When user clicks on that image, then only the image should be download

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.