Skip to content

Instantly share code, notes, and snippets.

@manuelernesto
Last active January 16, 2019 08:18
Show Gist options
  • Save manuelernesto/d1ad6269f2ba8610cf55049e408b921d to your computer and use it in GitHub Desktop.
Save manuelernesto/d1ad6269f2ba8610cf55049e408b921d to your computer and use it in GitHub Desktop.
val person = Person(
null,
etName_firestore_update.text.toString(),
etEmail_firestore_update.text.toString(),
etPhone_firestore_update.text.toString())
db.collection("Person").document(personExtra.id!!).set(person)
.addOnSuccessListener {
"Updated Successful.".toast(this@UpdateFirestoreActivity)
finish()
}.addOnFailureListener { exception ->
"Error: ${exception.message}".toast(this@UpdateFirestoreActivity)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment