[Solved] Retriving data from Firebase in Arraylist in Android [closed]
Assuming you have a model class for your electrician object named Electrician, to get a list of electrician objects, please use the following code: DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference(); DatabaseReference electricianRef = rootRef.child(“Employee”).child(“Electrician”); ValueEventListener valueEventListener = new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { List<Electrician> list = new ArrayList<>(); for(DataSnapshot ds : dataSnapshot.getChildren()) { Electrician … Read more