- Mastering Firebase for Android Development
- Ashok Kumar S
- 51字
- 2021-06-18 18:49:12
Updating data
To update data, we can use the setValue() method by passing updated values. You can likewise utilize updateChildren() by passing the way to update data without exasperating other child nodes:
String newEmail = "ashokslsk@gmail.com";
mDbRef.child(userId).child("email").setValue(newEmail);
The following screenshot illustrates the updated value for the email field: