Last active
January 16, 2019 08:16
-
-
Save manuelernesto/479cb03a1778b4ebbc730365485a661e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = FirebaseFirestore.getInstance() | |
val mPersonTable: CollectionReference = db.collection("Person") | |
val person = Person( | |
null, | |
etName_firestore.text.toString(), | |
etEmail_firestore.text.toString(), | |
etPhone_firestore.text.toString()) | |
mPersonTable.add(person) | |
.addOnSuccessListener { | |
"Thanks for your subscription.".toast(this@FirestoreActivity) | |
} | |
.addOnFailureListener { exception -> | |
"Error: ${exception.message}".toast(this@FirestoreActivity) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment