Как получить все данные из базы данных Firebase?
![enter image description here](https://i.stack.imgur.com/CFtXO.png)
ValueEventListener postListener = new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
info info = dataSnapshot.getValue(info.class);
// [START_EXCLUDE]
tw_mail.setText(info.email);
tw_Address.setText(info.address);
tw_fact.setText(info.fact);
tw_ownername.setText(info.ownername);
tw_phone.setText(info.phone);
tw_pin.setText(info.pin);
tw_rent.setText(info.rent);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
Toast.makeText(locatepg.this, "Failed to load post.", Toast.LENGTH_SHORT).show();
}
};
mDatabase.addValueEventListener(postListener);