I am using volley to show the user images and other data like(name,description) while they are online. It's working fine. I want to save the image and data in sqlite so that the user can see them when they don't have internet connection. I know how to insert and retrieve data from sqlite but I don't know how to insert image from url to sqlite. Can anyone suggest me what can I do? Thank You
Asked
Active
Viewed 415 times
1
-
You can save the image to external storage and get its new url and insert into sqllite. – Burak Cakir Jan 11 '17 at 06:37
-
Refer to answer here, http://stackoverflow.com/questions/11790104/how-to-storebitmap-image-and-retrieve-image-from-sqlite-database-in-android – Akanksha Hegde Jan 11 '17 at 06:38
1 Answers
1
You have so many option to store image in sqlite:
convert your bitmap to base64 and store Base64 image string to your db.
Store your bitmap downloaded from url in cache memory and store the cache path in your db.
Store the server url in db and use imageLoader to download and show image from url.

Anjali
- 1
- 1
- 13
- 20