Skip to content
Advertisement

How to access array data from Firebase Firestore?

I have a Firebase Firestore database that looks like this:

image link

And I want to store that data in my ArrayList<>

If You are not understanding anything you can check my previous question Question Link StackOverFlow

Advertisement

Answer

To display the of your favFoods array, please use the following lines of code:

JavaScript

So as you can see, you should call get() and cast the object to List. The result in the logcat will be:

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