0

I'm having trouble in getting all collections from Cloud Firestore into a list of documents. Again I'm saying collections from document(documents -> collections) , not documents from collection(collections -> documents) collections -> documents -> collections

db.collection("typesOfRepairs").document("Vehicles").get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
            @Override
            public void onSuccess(DocumentSnapshot documentSnapshot) {
                if (progressDialog.isShowing()){
                    progressDialog.dismiss();
                }
                Log.e("res",""+documentSnapshot.getData());
            }
        }).addOnFailureListener(new OnFailureListener() {
            @Override
            public void onFailure(@NonNull Exception e) {
                if (progressDialog.isShowing()){
                    progressDialog.dismiss();
                }
                Log.e("res",""+e.getMessage());
            }
        });

enter image description here

I know I will {Cars=2, Bikes=1} , but i need to get the collections(bikes,cars).

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193

0 Answers0