Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

snapshot for loop android java

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) {
                }
            });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #snapshot #loop #android #java
ADD COMMENT
Topic
Name
2+9 =