skip to Main Content

Firebase check item if exist

I'm saving an id to Firebase Realtime Database like this: binding.ivStar.setOnClickListener { firebaseDb.getReference("Users").child(uid).child("movie").push() .setValue(args.movie?.id)} And I need to check if this id exists in Firebase. And I did like this: private fun checkData() { val postRef = firebaseDb.getReference("Users").child(uid).child("movie") postRef.addListenerForSingleValueEvent(object :…

VIEW QUESTION
Back To Top
Search