I just implemented an SQLite database for a simple to do app for persistence. However, the problem is that when I restart the app, I do not have my data that is stored in an SQLite database. The following is my SQLite helper class:

```
public class DatabaseHelper extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "todo.db";
    public static final String TABLE_NAME = "student";
    public static final String ID = "id";
    public static final String TO_DO = "todo";

    public DatabaseHelper(Context context) {
        super(context, DATABASE_NAME, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        String CREATE_TO_DO_TABLE = "CREATE TABLE "
                + TABLE_NAME
                + "("
                + ID
                + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + TO_DO
                + " TEXT"
                + ")";
        sqLiteDatabase.execSQL(CREATE_TO_DO_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) {
        sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
        onCreate(sqLiteDatabase);
    }

    public boolean insertData(String todo){
        SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();
        ContentValues contentValues = new ContentValues();
        contentValues.put(TO_DO, todo);
        sqLiteDatabase.insert(TABLE_NAME, null, contentValues);

        return true;
    }
}

```

And in my MainActivity.java, I'm adding my List items into the database as well as the ListView.

```
public class MainActivity extends AppCompatActivity {
    DatabaseHelper databaseHelper;
    private final int REQUEST_CODE = 10;
    ArrayList <String> toDoItems = new ArrayList<>();
    ArrayAdapter<String> adapter;
    ListView listItems;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        listItems = (ListView) findViewById(R.id.listViewItems);
        adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, toDoItems);
        listItems.setAdapter(adapter);
        databaseHelper = new DatabaseHelper(this);

        ...
    }

    public void addItem(View v){
        EditText newItem = (EditText) findViewById(R.id.itemInputEditText);
        String item = newItem.getText().toString();
        databaseHelper.insertData(item);
        adapter.add(item);
        newItem.setText("");
    }
}

```

I believe I need to do something in the `onCreate` method but my `addItem(View v)` method is called through the button onClick.