Reputation: 17
I want to fetch the specific data from the firebase
into the android app.
I want to be fetch only that data where ar="Atif Aslam"
. How I can do that?
This is my database
Upvotes: 0
Views: 108
Reputation: 1221
Try using firebase.database.Query
Query msgQuery = childRef.orderByChild("ar").equalTo("Atif Aslam");
msgQuery.addChildEventListener(MainActivity.this);
Upvotes: 1
Reputation: 1161
try the following code:
DatabaseReference mDatabaseReference = FirebaseDatabase.getInstance().getReference("uploads");
Query query
= mDatabaseReference.orderByChild("ar").equalTo("Atif Aslam");
refer examples from firebase official site:https://firebase.google.com/docs/reference/android/com/google/firebase/database/Query
Hope this helps.
Upvotes: 1