Backendless Support
 
Answered

Code snippet for paging in Backendless 4.0

What is the prefered way to get more than 100 records of a table in Backendless 4.0?

This for instance is not so great:

  1. List<Person> persons = Person.find(personQuery);
  2. while (persons.size() > 0) {
  3. for (Person p : persons) {
  4. ...
  5. }
  6. personQuery.prepareNextPage();
  7. persons = Person.find(personQuery);
  8. }

Leave a Comment

Comments (1)

photo
1

Here's another example which uses asynchronous API:

https://backendless.com/docs/android/doc.html#data_file_paging

Mark