skip to Main Content

Kotlin coroutine with firebase functions

I was having a problem implementing the Firebase anonymous sign-in function with Kotlin coroutine. Following is the code for that: Repository.kt suspend fun getUserId(){ firebaseHelper.getUserId().collect{ if (it == "Successful"){ emit(it) } else { emit("Task unsuccessful") } } } FirebaseHelper.kt fun…

VIEW QUESTION
Back To Top
Search