if you want to get value of specific node or child node like this
Here if you want to get child node(address) value. You can get it in this way
DatabaseReference db= FirebaseDatabase.getInstance().getReference().child("RouteCounter").child("node");
db.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot userSnapshot: dataSnapshot.getChildren()) {
String email = userSnapshot.child("cnt").getValue(String.class);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
throw databaseError.toException();
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…