Vinicius DSL Vinicius DSL - 1 year ago 224
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download