Sorry … but I haven’t understand the code in the "Data paging " what is the
CountDownLatch latch = new CountDownLatch( 1 );
and why we use it ?
and if have 1 page then I used nextPage method … what it will return ?
that’s my code :
BackendlessDataQuery dataQuery = new BackendlessDataQuery();
dataQuery.setPageSize(100);
Backendless.Persistence.of(Messages.class).find(dataQuery,new AsyncCallback<BackendlessCollection<Messages>>() {
@Override
public void handleResponse(BackendlessCollection<Messages> messagesCollection) {
if (messagesCollection != null) {
UsersMessages = messagesCollection.getCurrentPage();
if(messagesCollection.getTotalObjects() > 100){
UsersMessages = messagesCollection.nextPage().getCurrentPage();
}
messagesAdapter adapter = new messagesAdapter(MainActivity.this, UsersMessages);
listView.setAdapter(adapter);
swipeRefreshLayout.setRefreshing(false);
}
}
@Override
public void handleFault(BackendlessFault backendlessFault) {
}
});
where I have to use nextPage method ?
and sorry for taking your time