📜  循环android java代码示例的快照

📅  最后修改于: 2022-03-11 14:52:23.708000             🧑  作者: Mango

代码示例2
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) {
                }
            });