Ideal answer: Downloading multiple files firebase
Downloading multiple files firebase | |
Downloading multiple files firebase | |
Downloading multiple files firebase | |
Downloading multiple files firebase | |
Downloading multiple files firebase |
How properly download multiple files from Firebase Storage on Android?
I have a problem with file download from Firebase Storage on Android application. I know the method how to download one image and display it on . But I have a problem when I need to download more than one image in single activity.
I have the names of the files in the and they are for example: [].
For files download I have written a method:
This method downloads a file with given name as a parameter and sets it to new .
The method to set the image on the ImageView:
(Problem shouldn't be there)This method creates new and sets downloaded to it.
I am using method on activity method like this:
I have two objects in my Firebase Storage with given names []. Same file names are stored to for getting files by name. In activity method calls method for each name. The method downloads the image and sets it to new .
My problem is that only one of the images will be downloaded and displayed twice. I have tried some other methods to get the names from list and download the file. So sometimes img1 appears on both s and sometimes - img2. For this method appears only img1 twice.
p.s.: I have searched for the answers for this type of problem. There is no possible duplicates.
-