user6930989 user6930989 - 20 days ago 9
Android Question

Modifying a specific value under a child node in firebase for android

I'm new to firebase and currently i'm making my project using firebase as backend. but i'm having this issue. I have my firebase database structure like this:-

root:
child1:
value1:
value2:
child2:
value1:
value2:


and so on. I want to edit/modify value2 under child 1. How can i do that. Any help would be appreciated.

Answer
DatabaseReference c1v2= FirebaseDatabase.getInstance().getReference().child("child1").child("value2");
c1v2.setValue("Value");

Please start here: https://firebase.google.com/docs/database/android/read-and-write