Currently, I have an empty array in Firestore dashboard. And I'm trying to add some item to it. I've followed this, but no result. I don't want to sore and rewrite this element.
My gradle contains:
implementation 'com.google.firebase:firebase-firestore:17.0.4'
and my code:
import com.google.firebase.firestore.FieldValue
...
val documentReference = firestore.collection("events")
.document(event.firebaseUserUid + "-" + event.title)
documentReference
.update("participants", (FieldValue.arrayUnion(FirebaseAuth.getInstance().currentUser!!.uid)) )
But FieldValue.arrayUnion doesn't exists.
Newest version of firestore now supports it:
implementation 'com.google.firebase:firebase-firestore:17.1.0'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments