I have TextView and I want to show player rank like Your Rank Is 6th
There is a collection that has 8 documents, Inside every document has field named player_name and player_score
.
player_name
= Liam ,player_score
= 14player_name
= Noah ,player_score
= 72player_name
= Oliver ,player_score
= 18player_name
= Elijah ,player_score
= 139player_name
= William ,player_score
= 419player_name
= James ,player_score
= 832player_name
= Benjamin ,player_score
= 1932player_name
= Lucas ,player_score
= 6
Let us suppose I signed in by James account, So the TextView should show me this result after using OrderBy Descending
on Firestore -> Your Rank Is 2nd
How can I do it?
Note 1 : Is that will cost me 1800 reads in my quota because in fact I have more than 1800 documents not 8?
Note 2 : Every document name is player id