Getting heavy data. Cursor window: window is a complete error.

I am new to android, and in my application I have to extract heavy data from the server (of which two are images) and store them in a local database. So far I have made a standard method, which includes collecting all the data at once and storing them in a local database. But I have a memory error. Are there any recommendations that I need to follow when you get heavy data? I also store images in a local database in blob form.

+5
source share
1 answer

I think this is because the query results are too large for the cursor window and it is requesting more memory or is called due to the blob image.

Since your requirement was satisfied using the infinite scroll or infinite scroll I to use this.

And the best way to save the image is to save the path to the database and save the image to the SD card.

You will get a link from the following link to implement an infinite scroll view using the recycler view

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

+1
source

Source: https://habr.com/ru/post/1242523/


All Articles