Skip to content

Instantly share code, notes, and snippets.

@kenny-io
Created October 11, 2017 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenny-io/8c3db83ea9733af67580985549caec3c to your computer and use it in GitHub Desktop.
Save kenny-io/8c3db83ea9733af67580985549caec3c to your computer and use it in GitHub Desktop.
private void UpdateData() {
DocumentReference contact = db.collection("PhoneBook").document("Contacts");
contact.update(NAME_KEY, "Kenny");
contact.update(EMAIL_KEY, "kenny@gmail.com");
contact.update(PHONE_KEY, "090-911-419")
.addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(MainActivity.this, "Updated Successfully",
Toast.LENGTH_SHORT).show();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment