When I add data to collection/document as "/first/second/third/..."
For Example, "/first/second/third/thirdONE" then "/first/second/third/thirdTWO" then "/first/second/third/thirdTHREE"
then I cannot get list of entries inside "/first/second/third/" But when I add entries from Firebase Console manually, It works! And, When I add an entry from the app it appears on firebase console as italic but when I do it manually it appears normal...!
val newEntry: String = "first/" +
"second/" +
"third/"
firestoreDatabase
.collection(newEntry)
.get()
.addOnSuccessListener { querySnapshot ->
println("*** " + querySnapshot.size())
for (document in querySnapshot) {
Log.d(
"*** Firestore",
document.id + " => " + " Data == " + document.data
)
}
}
.addOnFailureListener { exception ->
Log.w("***", "Error getting documents.", exception)
}
[Solution] Add Some Data to the Field Section of Document.