1

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

2
  • You can save the image to external storage and get its new url and insert into sqllite. Commented Jan 11, 2017 at 6:37
  • Refer to answer here, stackoverflow.com/questions/11790104/… Commented Jan 11, 2017 at 6:38

1 Answer 1

1

You have so many option to store image in sqlite:

  1. convert your bitmap to base64 and store Base64 image string to your db.

  2. Store your bitmap downloaded from url in cache memory and store the cache path in your db.

  3. Store the server url in db and use imageLoader to download and show image from url.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.