I have a similar problem as this question question, but no one has answered yet. I have a collection that has documents and those documents have further collections. When I try to get these documents I receive 0 documents. database image
Code
db.collection("teachers").document("irfany").collection("OpenAssignments").
get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
Log.d("getdocumentSize", task.getResult().size() + " => ");
for (QueryDocumentSnapshot document : task.getResult()) {
}
} else {
Log.d("Error", "Error getting documents: ", task.getException());
}
}
});
Output D/getdocumentSize: 0 =>