Firestore Tutorial Part 3 – RETRIEVE DATA FROM DOCUMENT – Android Studio Tutorial
In part 3 of the Firestore tutorial, we retrieve our uploaded document by calling the get method on our DocumentReference. As before we add an OnSuccessListener where we get a DocumentSnapshot that contains the data of our document. We can either retrieve our values directly by passing the key for each value to the DocumentSnapshot’s getString method, or alternatively recreate our original Map as a whole.
In the OnFailure method we print the exception to the stacktrace.
Watch the whole playlist:
Code for this part:
https://gist.github.com/codinginflow/db3e8033b21f86d57a4f1eb853488f50
____________________
💻 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 :80263
android studio