Not able to add image to sqlite : The Code is shown below , I am not able to understand how can I take image from gallery in ImageHolder like I have done for saving name, phone, date. What should I do for adding image from a button to SQlite table and then retrieve to a custom listview.

I have created the column_4_image

This is my SQLiteHelper.java

  

      @Override
        public void onCreate(SQLiteDatabase database) {
        
            String CREATE_TABLE="CREATE TABLE IF NOT EXISTS "+TABLE_NAME+" ("
                    +Table_Column_ID+" INTEGER PRIMARY KEY, "
                    +Table_Column_1_Name+" VARCHAR, "
                    +Table_Column_2_PhoneNumber +" VARCHAR, "
                    +Table_Column_3_Date+" VARCHAR,"
                    +Table_Column_4_Image+"BLOB)";
            database.execSQL(CREATE_TABLE);
        
        }

       
This is my addDataActivity.java



    public void SQLiteTableBuild(){
    
        sqLiteDatabaseObj.execSQL("CREATE TABLE IF NOT EXISTS "
                +SQLiteHelper.TABLE_NAME+"(id "
                +SQLiteHelper.Table_Column_ID +" PRIMARY KEY AUTOINCREMENT NOT NULL, "
                +SQLiteHelper.Table_Column_1_Name+" VARCHAR, "
                +SQLiteHelper.Table_Column_2_PhoneNumber+" VARCHAR, "
                +SQLiteHelper.Table_Column_3_Date+" VARCHAR, "
                +SQLiteHelper.Table_Column_4_Image+"BLOB);");
    
    
    }
    
    public void CheckEditTextStatus(){
    
        NameHolder = editTextName.getText().toString() ;
        NumberHolder = editTextPhoneNumber.getText().toString();
        DateHolder = editTextDate.getText().toString();
    
        EditTextEmptyHold = !(TextUtils.isEmpty(NameHolder) || TextUtils.isEmpty(NumberHolder) || TextUtils.isEmpty(DateHolder));
    }
    
    
    
    public void InsertDataIntoSQLiteDatabase(){
    
        if(EditTextEmptyHold)
        {
    
            SQLiteDataBaseQueryHolder = "INSERT INTO "+SQLiteHelper.TABLE_NAME+" (name,phone_number,date) VALUES('"+NameHolder+"', '"+NumberHolder+"','"+DateHolder+"');";
    
            sqLiteDatabaseObj.execSQL(SQLiteDataBaseQueryHolder);
    
            sqLiteDatabaseObj.close();
    
            Toast.makeText(activity_add_data.this,"Data Inserted Successfully", Toast.LENGTH_SHORT).show();
    
        }
        else {
    
            Toast.makeText(activity_add_data.this,"Please Fill All The Required Fields.", Toast.LENGTH_SHORT).show();
    
        }
    
    }




this is my activityListDisplay.java

    private void ShowSQLiteDBdata() {
    
        sqLiteDatabase = sqLiteHelper.getWritableDatabase();
    
        cursor = sqLiteDatabase.rawQuery("SELECT * FROM "+SQLiteHelper.TABLE_NAME+"", null);
    
        ID_Array.clear();
        NAME_Array.clear();
        PHONE_NUMBER_Array.clear();
        DATE_Array.clear();
    
        if (cursor.moveToFirst()) {
            do {
                ID_Array.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_ID)));
                //Inserting Column ID into Array to Use at ListView Click Listener Method.
                ListViewClickItemArray.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_ID)));
    
                ListViewLongClickItemArray.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_ID)));
    
                NAME_Array.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_1_Name)));
    
                PHONE_NUMBER_Array.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_2_PhoneNumber)));
    
                DATE_Array.add(cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_3_Date)));
    
            } while (cursor.moveToNext());
        }
        //for reversing list
        Collections.reverse(ID_Array);
        Collections.reverse(NAME_Array);
        Collections.reverse(PHONE_NUMBER_Array);
        Collections.reverse(DATE_Array);
        listAdapter = new ListAdapter(activity_list_display.this,
                ID_Array,
                NAME_Array,
                PHONE_NUMBER_Array,
                DATE_Array
        );
    
        LISTVIEW.setAdapter(listAdapter);
    
        cursor.close();
    }

