https://kotlinlang.org logo
Title
u

user

07/06/2022, 3:51 PM
How returning of data from addOnSuccessListener{} works in Kotlin? I am trying to get user data from Firebase Firestore database , I am intended to get info of user who is currently logged in. Now for make this information accessible from other Classes I created get method for username and email, when I used get method from Another class , I got an indexOutOfBoundsException with list index 0,size 0. How am I supposed to return data from inside of addOnSuccessListener(), And what is the reason my array is empty although I added the data on it package...