As a newbie in firebase I tried to mimic a kind of \"where clause\" request to retrieve the user\'s wallet in this simple use case:
User
48bde8f8-3b66-40bc-b
You can use nested Query for this.! if you have multiple random id you can easily compare them.! DatabaseReference reference = FirebaseDatabase.getInstance().getReference();
Query query = reference.child("user");
query.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
// dataSnapshot is the "issue" node with all children with id 0
for (DataSnapshot issue : dataSnapshot.getChildren()) {
// do something with the individual "issues"
Query query = reference.child("user").child(dataSnapshot.getKey().equals(YourData)));
query.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});