I am fetching a list of DocumentReference which I am fetching from firestore. It looks like this:
com.google.firebase.firestore.DocumentReference@4a69111d
However, I can't get the object using the above in the following code.
var loc = com.google.firebase.firestore.DocumentReference@4a69111d
var documentRef:DocumentReference = firestore.document(loc.toString())
documentRef.get().addOnSuccessListener { document ->
if (document != null) {
Log.d("SHARED_PREF_VM", "DocumentSnapshot data: ${document.data}")
}
})
Can I somehow convert com.google.firebase.firestore.DocumentReference@4a69111d to this form /cities/blr/areas/alpaca