📅  最后修改于: 2022-03-11 14:52:23.708000             🧑  作者: Mango
FirebaseDatabase.getInstance().getReference().child("users")
.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
User user = snapshot.getValue(User.class);
System.out.println(user.email);
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});