I am developing an application that stores some static images in sqlite and I want to retrieve the same in a imageview.
how do I do this
thanks.
I am developing an application that stores some static images in sqlite and I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
sqlite3 supports the
blobtype, you can save the bitmap content using theblobtype.However, the
blobtype has a size limit, and to save to a blob type is difficult.So, I suggest to save the bitmap local or on the sdcard, and save the path in the database.
added :
table define a column with name ‘image’ using
blobtypeconvert the image byte array, using SQLiteDatabase class method or content provider as you like:
public long insert (String table, String nullColumnHack, ContentValues values)to insert to table, so it save the image to
blob.and then: when you query the
blobdata, you can create the image like this:hope it can implement your request. -):