How do I obtain this data that is marked in this example, in a list.
Try this code, but nothing.
String cuswtId = String.valueOf (FirebaseDatabase.getInstance (). getReference (). child ("Users"). child ("Customers")
Any way?
What you need are the keys of the nodes, with this code you would read all the nodes that hang from customers, and from those nodes you'll keep the keys.
DatabaseReference myRef = FirebaseDatabase.getInstance().getReference().child("Users").child("Customers");
ValueEventListener eventListener = new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot nodo : dataSnapshot.getChildren()) {
String key = nodo.getKey(); //estos son los valores que buscas
Log.d("TAG", key);
}
}
@Override
public void onCancelled(DatabaseError databaseError) {}
};
myRef.addListenerForSingleValueEvent(eventListener);