Firestore Tutorial Part 9 – SIMPLE QUERIES – Android Studio Tutorial
In part 9 of the Firestore tutorial we filter our queries by calling a where method on our CollectionReference, like whereEqualTo or whereGreaterThanOrEqualTo. Into these methods we pass the key of the field in the document, and the value we want to filter for.
We can also order these results with the orderBy method, where we can pass Query.Direction.DESCENDING to get our results in descending instead of ascending order.
Lastly we will use the limit method to only retrieve a certain number of results.
We can add all these queries before the get method or before the addSnapshotListener method.
Watch the whole playlist:
Code for this part:
https://gist.github.com/codinginflow/1c6e3bd4e4be3790041d3f4f989ef50b
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :28747
android studio