I am pulling information from firestore in android studio, it prints it to the terminal, but I cannot assign or assign the data (int) to the "size" variable, I do not know where I am doing wrong, can anyone help?
var size=0
authFireStore.collection("xxxColection").document("yyDocument").collection("queryColection").whereEqualTo("Cityname","city").get().addOnSuccessListener { documents ->
for (document in documents) {
size=documents.size()
println(documents.size())
}
println("Size :"+size)