Skip to content
Advertisement

How to read data from firebase without specifying the child?

good day, here is my firebase real-time structure

JavaScript

Here is my java code

JavaScript

The above code is the sample of my class which i used in reading the logged user data with its firebaseUser.getUid()

Question. How can i read all the User data all together without having to provide or use firebaseUser.getUid() in the child method ? Thanks.

Advertisement

Answer

By getReference("Users") you will get all list which is inside the User and with Datasnapshot loop you can list down each user. Here is the code:

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