i want to check nick name in hashmap but i didn't get all document from cloud firebase? How can i do that? Thanks in advance.
val db = Firebase.firestore
val docRef = db.collection("User").document()
docRef.get().addOnSuccessListener { documents->
if (documents != null) {
val obj= documents.get("Basic Information") as HashMap<*, *>
val checkNick= obj["nick"].toString()
if (checkNick == nick){
Toast.makeText(activity, "exists.", Toast.LENGTH_LONG).show()
}
} else {
Log.d(TAG, "No such document")
}
}