skip to Main Content

Firebase(with Kotlin) ArrayList Casting Error

I'm developing a basic shopping app with Kotlin. And I'm using Firebase to upload and retrieve "bought products" ArrayList. I'm uploading it like this: val productId = productList.get(position).id boughtProductArray.add(productId) document.update("boughtItems",boughtProductArray) And retrieving like this: db.collection("gamevalues").document(userId).addSnapshotListener{snapshot, error-> if(error!=null){ Toast.makeText(holder.itemView.context,error.localizedMessage,Toast.LENGTH_LONG).show() }else{ if(snapshot!=null…

VIEW QUESTION
Back To Top
Search