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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With