Start a new topic

how to get count of any collection?

i am trying to access count of my collection but it returns me indexout of bound exception.

i am using this code:

AsyncAppData aggregate = mKinveyClient.appData("business- pages", EntityBuisnessTypes.class);

Query myQuery = new Query();

ArrayList fields = new ArrayList();


aggregate.count(fields, myQuery, new KinveyAggregateCallback() {


public void onSuccess(Aggregation arg) {

// TODO Auto-generated method stub

Log.i("TAG", "got: " +arg.results[0].get("_result"));


any help?

Hey Fahid,

Sorry for the slow response on this, I think it should be under Java to have the right eyes on it.
Hey, sorry for the delay in getting back to you!

Can you take a look at the troubleshooting guide to enable debug logging, so that you can see the raw requests and responses in logcat? Then, can you post those here? That should help me figure out what might be going on!
I'm also facing the same issue.

The **arg **variable returns null value all the time.
Login or Signup to post a comment