Getting Started With Cloud Firestore on Android - Firecasts

Firebase · 158K views · 2017 · 15:21

Open on YouTube

Web developmentSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the official starting point for Cloud Firestore on Android, both for listener and onComplete usage and for how subcollections are modeled.

Recommended by 2 people across 2 different months, 2017 to 2021.

What it is

A 15-minute Firecasts screencast from the official Firebase channel that walks through setting up Cloud Firestore in an Android app. It covers the basics of reading and writing data and explains how documents and collections are structured.

What people said

Recommends WhiteNinja · 2018-01 · Stack Overflow · on “Fragment transaction is breaking after cloud Firestore "this" listener”

After watching this video by the firestore team : [this video] I have tried to implement the "this" listener before "new" keyword at "OnSuccess" As an example: public void pullEventsFromDatabase() { mEventRef.get().addOnSuccessListener(getActivity(), new OnSuccessListener<QuerySnapshot>() { @Override public void onSuccess(QuerySnapshot documentSnapshots) { if (documentSnapshots.size() <= 0) { setNothingToShow(); Log.w(TAG, "Error getting documents. Cat might be empty"); } else { events.clear(); for (DocumentSnapshot document : documentSnapshots) { Event event = document.toObject(Event.class); events.add(new Event(event.getImageUrl(), event.getTitle(), event.getSummary(), event.getembeddedIDOrPowe

Recommends Divyani Yadav · 2021-09 · Stack Overflow · on “Way to Add data in Firestore”

Try implementing the code with the help of public documentation [LINK] in which the whole description of storing data into Firestore has been provided with the help of onSuccess and onFailure listeners and the video [this video] in which it has been explained along with using the onComplete Listener at 06:36.if the problem persist kindly share any error message you are getting.

Cites creativecreatorormaybenot · 2017-10 · Stack Overflow · on “How does the new Firebase Firestore DocumentDb model large subcollections”

I do not think that you have to do that at all because getting a Document will not download others from sub collections. That said it does not really have that disadvantage it had in Realtime Database . I could not find another source where it is mentioned in a short amount of time, so check out this video [this video] . It is the "Getting Started" video for Android and about 40 seconds in (from the time stamp provided in my link) he mentions exactly what I said and Todd Kerpelman [LINK] 's statement: "[...] it's very common to see a collection containing a bunch of documents, which then point to sub collections that contain other documents and so on." , basically implies that the team expects th