I'm learning about databases in android and have come across the following question, I would like to retrieve an image, how can I change the code below to image instead of string?
public List<String> getImage(){
List<String> listRows = new ArrayList<String>();
SQLiteDatabase db = this.getWritableDatabase();
Cursor c;
try {
c = db.rawQuery("SELECT image FROM " + MY_TABLE + " WHERE _id = " + _id, null);
if(c == null) return null;
String row;
c.moveToFirst();
do {
row = c.getString(0);
listRows.add(row);
} while (c.moveToNext());
c.close();
}
catch (Exception e) {
Log.e("LOGmsg getDBImage", e.getMessage());
}
db.close();
return listRows;
}