Skip to content
Advertisement

listAll() does not work for firebase in Android

i have created a function to list all files with in a reference.mStorageRef is defined public.

JavaScript

but when i execute this i get following ouput:

JavaScript

how can i use list all correctly.Please help

Advertisement

Answer

You’re looping over listResult.getPrefixes(), which are the subfolders in your ImageFolder.

Since you indicate you want to list files, you should loop over listResult.getItems() instead.

I find keeping the reference documentation open key to quickly fixing this sort of common mistake.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement