chazefate
chazefate

Reputation: 822

orderbyvalue fuction in android does not work?

I am trying to sort by highscore values and I have searched for examples like here: https://www.firebase.com/docs/android/guide/retrieving-data.html#section-queries

But still it doesn't work. I have tried to Log every step that I take but still no results. Please help me with this.

Firebase

My code where I use sort

Upvotes: 0

Views: 342

Answers (1)

koceeng
koceeng

Reputation: 2163

It should be like this:

highScoreRef.orderByValue().addChildEventListener( ... ) { ... }

or if you want to save Query object first:

Query query = highScoreRef.orderByValue();
query.addChildEventListener( ... ) { ... }

Upvotes: 4

Related Questions