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:
💻 Find the BEST programming tutorials on TutHub:
⭐ Get my MVVM Caching Course now:
❗ Subscribe to the channel:
📨 Subscribe to the Coding in Flow newsletter:
❓ Join our free developer community:
📣 Follow Coding in Flow on other sites:
💰 Business requests, sponsoring, etc.: email@example.com