title: How to know that Snapshot Listener is finished | firestore?
body: <p>I have this code that fetch data from specific sub-collection:</p>
  
  <pre><code> db.collection("groups").document(id.get(i)).collection("members")
                  .get()
                  .addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
                          if (task.isSuccessful()) {
                              for (QueryDocumentSnapshot document : task.getResult()) {
                                  id.add(document.getId());
                                  Log.e(Tag, document.getId() + " =&gt; " + document.getData());
  
                                  if (task.getResult().isEmpty()) {
                                      Log.d(Tag, "onSuccess: LIST EMPTY");
                                      return;
                                  } else {
                                      // Convert the whole Query Snapshot to a list
                                      // of objects directly! No need to fetch each
                                      // document.
                                      Log.e(Tag, task.getResult() + "");
                                      typeAll = task.getResult().toObjects(GroupMembers.class);
                                  }
                              }
                          } else {
                              Log.e(Tag, "Error getting documents: ", task.getException());
                          }
  </code></pre>
  
  <p>But I need to call a method after fetching all the data by snapshots. How to achieve that? what should I test?</p>