I went through various links and solutions delete-child-from firebase, How to remove child nodes and try to use in my project but nothing works.As following the link Deletion of child nodes,
DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
rootRef.child("calendario").child("-L7jrJ6DtQWrmZsC4zvT").removeValue();
it works on the case where key is not generated which is not mine case.Database Structure is here.
Following piece of Code is for deletion of individual child which I have tried. Any help is appreciated.
delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseDatabase ref = FirebaseDatabase.getInstance();
DatabaseReference myRef = ref.getReference("Students");
String key = myRef.push().getKey();
myRef.child(key).removeValue();
}
});