public Cursor getImages(long rowId) throws SQLException { Cursor mCursor = db.rawQuery(\"select * from Pictures WHERE id=\" + rowId + \";
And what you should do is to replace
c1.moveToFirst(); while(c1.isLast()){ //your code }
By
//c1.moveToFirst(); while(c1.moveToNext()){ //your code }