Vinicius DSL Vinicius DSL - 1 month ago 5x
Android Question

Android Firebase Query

I have this structure
enter image description here
Now, Im making a query like this:

DatabaseReference myRef = database.getReference("users");
myRef.equalTo("6991580","ci").addListenerForSingleValueEvent(new ...

I was expecting the second node as result.. Then I get:

DataSnapshot { key = users, value = null }

So, what is wrong with this query? or maybe Im doing something wrong?

Best regards and thanks for reply.


You need to tell Firebase what child property you want to order/filter on:


The other format of ordering is a commonly misunderstood version. I'd recommend simply staying away from it.