Why service.list().setPageSize(pageSize)doesn’t work? It does not return a list of items with the specified pageSize. Where is the problem?
EDIT
Here is an example of code that does not work :
Appsactivity.Activities.List request = service.activities().list()
.setDriveFileId(fileId)
.setGroupingStrategy("driveUi")
.setSource("drive.google.com")
.setUserId("me")
.setPageSize(pageSize);
ListActivitiesResponse response = request.execute();
do {
response = request.execute();
List<Activity> items = response.getActivities();
System.out.println(items.size());
request.setPageToken(response.getNextPageToken());
} while (request.getPageToken() != null && request.getPageToken().length() > 0);
If I have 7 actions and pageSize = 3than this does not return pages 3, 3, 1, as expected, but instead returns pages of size 6, 1.
The same problem is discussed here. The problem with the Google Graphics API during the paging table , but setting pageSize directly through .set("pageSize", pageSize)and .set("page", "enable")did not help.
Another question like app-engine-java-api-pagesize
source
share