Question

I need some suggestion here on the Sql database approach for storing rss feed data First : My rss feeds gives image url links which i diplay using bitmap and inputstream at runtime but now for offline purposes so as to use app when internet not available how do i load them, do i need to save complete images like whatsapp does right ? is this approach right ? if yes how to save complete images in database ? a sample code will help.

Last i want to save the complete database on sd card not in internal memory , storing data on sd card will work fine or it will create problem ? because whatsapp or many other apps stores quite a data in internal memory !! if storing on sd card is not a problem how do i store complete data on sd card ?

No correct solution

OTHER TIPS

If your image comes from your online server, use cache then save the URL to your SQLite database together with the other data you need to access when offline.

As for the downloading and caching approach for images you can see this link:

http://theandroidcoder.com/utilities/android-image-download-and-caching

Once the image is downloaded and cached you can view it even offline. :) Or else you may want to store the whole image and save it in a specific path on your phone and access it when internet connection is not present.

As for your idea on storing in SD card. there is only one problem I can think about. When the SD card is removed, all your data is lost. You should search on how to better handle data on your phone as well as do as research on storing in external storage for this one. It's now on your end to do some research about it to further understand its risk and advantages.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top