this is how I save sqlite data from non activity class using `getApplicationContext()`

```
public class SaveInSQLiteContacts {

    private Context context;

    public SaveInSQLiteContacts(Context context){
        this.context = context;
    }

    public void save(String name, String imageKey, String email, String phone, String uid){

        SQLiteContacts sqLiteContacts = new SQLiteContacts(context);
        SQLiteDatabase database = sqLiteContacts.getWritableDatabase();
        ContentValues contentValues = new ContentValues();

        byte [] image = null;
        if(imageKey != null)
            image = Base64.decode(imageKey, Base64.DEFAULT);

        contentValues.put(SQLiteContacts.KEY_NAME, name);
        contentValues.put(SQLiteContacts.KEY_IMAGE, image);
        contentValues.put(SQLiteContacts.KEY_EMAIL, email);
        contentValues.put(SQLiteContacts.KEY_PHONE, phone);
        contentValues.put(SQLiteContacts.USERID, uid);
        database.insert(SQLiteContacts.CONTACTS, null, contentValues);

        sqLiteContacts.close();
    }
}

```

and this is how I`m trying to get data from it 

```
private void checker(){
    SQLiteContacts sqLiteContacts = new SQLiteContacts(getApplicationContext());
    SQLiteDatabase database = sqLiteContacts.getWritableDatabase();
    Cursor cursor = database.query(SQLiteContacts.CONTACTS, null, null, null, null, null, null);

    if(cursor != null) {
        if (cursor.moveToFirst()) {
            int i = cursor.getColumnIndex(SQLiteContacts.KEY_ID);
            int itemId = cursor.getColumnIndex(SQLiteContacts.KEY_NAME);
            int fixerId = cursor.getColumnIndex(SQLiteContacts.USERID);

            do {
                int id = cursor.getInt(i);
                String itemName = cursor.getString(itemId);
                String fixerUID = cursor.getString(fixerId);

                Log.d("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", itemName);
                Log.d("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", fixerUID);
                Log.d("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", String.valueOf(id));
            } while (cursor.moveToNext());
        }
    }
    cursor.close();
    sqLite.close();
}

```

this is what I`m getting after:

```
Failed to read row 0, column 0 from a CursorWindow which has 0 rows, 6 columns.
java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.

```

what am I doing wrong?