In this example, we use this database:
"your-project-name" : {
"users" : {
"randomUserId1" : {
"display-name" : "John Doe",
"gender" : "male"
}
"randomUserId2" :...
Note: You need to know which data referenced by getReference() first before you can completely understand this example.
There are three common method to get your data from Firebase Realtime Database:
addValueEventListener()
addListenerForSingleValueEvent()
addChildEventListener()
When w...