vishnu sharma February 2016

Getting heavy data throws Cursor Window: Window is full error

I am new to android and in my app I have to fetch heavy data from server (out of which two are images) and store it in local database. Till now, I have done standard way which involves fetching all data at once and storing it in local database. But I am getting out of memory error. Is there any guidelines which I need to follow while fetching heavy data? Also I am storing images in local database in blob form.

Answers


Rahul February 2016

I think this is because query results are too large for the cursor's window and it requests more memory or caused because of blob image .

Since your requirement met using endless scroll or infinite scroll I recomment to use that .

And best way to store image is to store path in DB and store image in SD card

You will get reference from following link to implement infinite scroll view using recycler view

http://android-pratap.blogspot.in/2015/06/endless-recyclerview-with-progress-bar.html

Post Status

Asked in February 2016
Viewed 2,466 times
Voted 5
Answered 1 times

Search




Leave an answer