I want all child list from Firebase in android.
I have implement this code but its not working.
mFirebaseRef = new Firebase(FIREBASE_URL);
mFirebaseRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
List<String> td = (ArrayList<String>) dataSnapshot.getValue();
//notifyDataSetChanged();
}
@Override
public void onCancelled(FirebaseError firebaseError) {
}
});
Use GenericTypeIndicator to get List of Child Node from Firebase ArrayList structured DataBase
Works Like a Charm
In my case only given solution worked fine.
Screenshot of Firebase ArrayList structure:
How to fetch whole list from Firebase from DataSnapshot.
Education.java: (Model class).
Hope this would works fine.
your problem is why your code doesn't work.
this your code:
you miss the simplest thing:
getChildren()
I hope below code works
Only work If child have no
SubChild