File paging with volley

So I want to fetch images for a wallpaper app in android without using Backendless API.I used volley and it works but when I am using “pageSize” and “offset” as stated in one of docs.I am getting some files repeated in next set of images.

Hi Vikram

Please provide us request examples what return duplicates, maybe CURLs or a code snippet what we can run to reproduce the issue

Regards, Vlad

Hi here is a snippet from my android code.I am getting same files repeated some times.I am getting files from a folder in Backendless’s FILE system.

 mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);

            visibleItemCounter = mRecyclerView.getChildCount();
            totalItemCounter = mGridLayoutManager.getItemCount();
            firstVisibleItem = mGridLayoutManager.findFirstVisibleItemPosition();

            if (processingNewItem) {
                if (totalItemCounter > previousTotalItem) {
                    processingNewItem = false;
                    previousTotalItem = totalItemCounter;

            if (!processingNewItem && (totalItemCounter - visibleItemCounter) <= (firstVisibleItem + visibleThresholdItem)) {
                Snackbar.make(mRecyclerView, "Loading More Pictures...",
                mPictureUrl = ApiUrls.PICTURE_BASE_URL + "?"+ApiUrls.PAGE_OFFSET + "=" + String.valueOf(pageCounter) +
                        "&" + ApiUrls.PER_PAGE_ITEM_OFFSET + "=" + "15";
                processingNewItem = true;

And also pay attention, that if you added the records to the table between two ‘get’ requests, then it can happen.

There is no other CRUD methods in my app except GET.;;
and so on is the api call precisely.

I see, you use wrong “offset” it should be 0 for the first request and 15 for the second
see the doc:

‘offset’ means the amount of records that must be skipped.

Thank you for the help I managed to solve it.Great community.
Is there a way to generate thumbnail for all images using Backendless.

Thank you for the quick help.It works now.

Please, see this article. It may help you to understand how to use backendless to create thumbnails.