When I run this code
BackendlessCollection<FileInfo> fileInfos = Backendless.Files.listing("/media", "*.jpg", false, 100, 0);
while (fileInfos.getCurrentPage().size() > 0) {
for (FileInfo fi : fileInfos.getCurrentPage()) {
Date createdOn = new Date(fi.getCreatedOn());
if(createdOn.after(lastSyncDate))
downloadFile(fi);
}
fileInfos = fileInfos.nextPage();
}
I get this exception
java.lang.ClassCastException: com.backendless.BackendlessSimpleQuery cannot be cast to com.backendless.persistence.BackendlessDataQuery
On the last line:
fileInfos = fileInfos.nextPage();