I am trying to use Firebase in my android application. I am following documentation for Saving and retrieving, But the Sample database(Dragon) which is used in tutorial has
You're creating a query in this line:
Query queryRef = myFirebaseRef.orderByChild("fullName");
Like that the query orders the child nodes by their fullName
value. But it doesn't yet limit what child nodes are returned.
To limit the nodes, you also have to filter. e.g.:
Query queryRef = myFirebaseRef.orderByChild("fullName").equalTo("gooner");
You can also get a range of nodes, by filtering with startAt
and/or endAt
instead of equalTo
.
As Kato commented:
It looks like there is a superfluous level of children. The data is structured as
saving-data/fireblog/
. and the fluff layer needs to be removed for those queries to work. You can't query children of children./fluff/...actual data..