0

I've got the Kinvey's Google Places functionality working pretty well, the only thing that has not been working is the fact that when my entity gets filled by my query it returns only 20 results, even if I set Query.Setlimit(100) and Query.setSkip(0)

I'm using:

Android Studio 0.6.1

Kinvey-Android-Lib 2.6.14

Kinvey-Java-2.6.14

Here is a code snippet.

    Query qry = new Query(new MongoQueryFilter.MongoQueryFilterBuilder());
    qry.setLimit(50);
    qry.setSkip(0);
    qry.nearSphere("_geoloc", marker.getPosition().latitude,
                    marker.getPosition().longitude, 100);
    AsyncAppData<EventEntity> locs = kinveyclient.appData("locations",
    EventEntity.class);
    locs.get(qry, new KinveyListCallback<EventEntity>() {
        @Override
        public void onSuccess(EventEntity[] eventEntities) {
    ... 
            // code executes fine but eventEntities.length 
             always = 20 regardless of location, Limit or Skip
    }

Am I missing something?

Ryno Coetzee
  • 516
  • 4
  • 13

1 Answers1

0

I haven't yet used the Kinvey Library but I do know from personal experience with Google Places Api the result returned is only 20 results by default. Looking at the Kinvey Docs on Location, it refers to the Google Places API.

In which it states:

By default, each Nearby Search or Text Search returns up to 20 establishment results per query; however, each search can return as many as 60 results, split across three pages. If your search will return more than 20, then the search response will include an additional value — next_page_token.

Andrew Gable
  • 2,692
  • 2
  • 24
  • 36