0

I want to show the names of italicized documents in firestore in recyclerview, but I cannot show them and I cannot delete them from firestore, I have no idea how to do this.

I found out that these are not real data and just for referencing sub collection but I don't know how to solve this

The lines of code I added to the firestore

  Courses.document("KDXnJKKno1D2xtG9G6UE").collection("Lessons")
                        .document(txt_ders)
                        .collection("students")
                        .add(new DersEklePerson())
                        .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {
                            @Override
                            public void onSuccess(@NonNull DocumentReference 
                                                                       documentReference) {

                                Toast.makeText(DersEkleActivity.this,"Ders başarıyla 
                                               eklendi.",Toast.LENGTH_LONG).show();
                            }
                        }).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception e) {

                    }
                });


Courses.document("KDXnJKKno1D2xtG9G6UE")
                        .collection("Lessons")
                        .document(txt_ders)
                        .collection("teachers")
                        .add(new DersEklePerson())
                        .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {
                            @Override
                            public void onSuccess(@NonNull DocumentReference 
                                                  documentReference) {

                            }
                        }).addOnFailureListener(new OnFailureListener() {
                        @Override
                        public void onFailure(@NonNull Exception e) {

                        }
                    });
  • These codes add to the firestore as follows and I cannot pull them from the firestore and show or delete them.

  • I want to pull and show all of this data and I want to delete it whenever I want, how can I do it?

enter image description here

Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734
partizal
  • 23
  • 6
  • According to my research We cannot add another collection to the collection from a remote environment in firebase, for example in android studio. When we add a document to the collection, the reason why it is written in italics is that it references other collections. Unfortunately, we cannot perform any operation with italic document data.so we need to convert the documents to collection to pull the document data, in this we need to add a field manually in firebase.this is how i solved it. I added it as an edit. – partizal Jan 19 '22 at 12:53

0 Answers0