Hi I would like to use logical AND in the firebase firestore query and add the particular count to the array object. I would like to get the count according to my logical and condition but the query which I wrote was giving me the whole count for m=obj.getUid().More over the value "c" is not getting added to the arraylist instead 0 is getting added up there. In the end I would like to use logical and, get the count assign to the "c" that c need to be added up to an arraylist.
c=0;
obj.setUid(d.getId().toString());
db.collection("individuals").whereEqualTo("m",obj.getUid()).whereEqualTo("ctrApproved2","").whereEqualTo("ctrApproved","").get()
.addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
c=queryDocumentSnapshots.size();
Log.d("Lenght",String.valueOf(c));
}
});
man.add(obj.getUid()+" ("+c+")");