Here I am attaching code in which store image in Drawable and pass to Database with BLOB Datatype.
I try this, it store properly but not display image.
To get the image from the sqlite database i used the following:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] data=cur.getBlob(cur.getColumnIndex("img"));
baos.write(data);
Then to display the image i used to do the following:
InputStream is = database.getImageStream(someId);
Bitmap img = BitmapFactory.decodeStream(is);
The code below shows how to save the image into a BLOB field
ByteArrayOutputStream bos = new ByteArrayOutputStream();
image.compress(CompressFormat.PNG, 100, bos);
byte[] bytes = bos.toByteArray();
the bytes can be added to sqlite using
initialValues.put("<fieldname>", bytes); //ofcourse <fieldname> is of type BLOB