Skip to content

Instantly share code, notes, and snippets.

@Bahaaib
Created January 13, 2019 11:54
Show Gist options
  • Select an option

  • Save Bahaaib/c4bdf82c0eb2d588fa3aee4f7374a35a to your computer and use it in GitHub Desktop.

Select an option

Save Bahaaib/c4bdf82c0eb2d588fa3aee4f7374a35a to your computer and use it in GitHub Desktop.
Remove node from Firebase DB
DatabaseReference testRef = mRef.child("test");
testRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot db : dataSnapshot.getChildren()){
db.child("isAvailable").getRef().setValue(null);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment