i try to get random child from my firebase. but i cant, i was try from many idea from stackoverflow too but still not working. for example, i want get random child from "Bahan Makanan Susu", and after get a random child i want show the value of "kalori".
This my database created
this my currently code
reff = FirebaseDatabase.getInstance().getReference();
reff.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
String Sskal =dataSnapshot.child("Bahan Makanan Susu").child("3").child("Kalori").getValue().toString();
'child("3")' in here i create manually and i want to make it random. thankyou hope u all can help me