I\'d like to know if there\'s a way to save Images (of the type .gif) to the sqllite-database. If yes how should my DatabaseAdapter look like.
Also is t
There's nothing special in storing image to SQLite. Just create table with BLOB record type and do smth like:
protected long saveBitmap(SQLiteDatabase database, Bitmap bmp)
{
int size = bmp.getRowBytes() * bmp.getHeight();
ByteBuffer b = ByteBuffer.allocate(size); bmp.copyPixelsToBuffer(b);
byte[] bytes = new byte[size];
b.get(bytes, 0, bytes.length);
ContentValues cv=new ContentValues();
cv.put(CHUNK, bytes);
this.id= database.insert(TABLE, null, cv);
}
Probably you migth want to save image chunk by chunk, since there's limits/recommended BLOB size (don't really recall how much)