Code example for SQLiteOpenHelper

Methods: getReadableDatabasegetWritableDatabase

	public MyNoteDBAdapter open() throws SQLException { 
		try { 
			Log.d(TAG, "about to getWritableDatabase");
			db = dbHelper.getWritableDatabase();
		} catch (SQLiteException ex) {
			Log.d(TAG, "about to getReadableDatabase");
			db = dbHelper.getReadableDatabase();
		return this;
	public void close() { 
	public MyNoteDto insertMyNote(MyNoteDto mynote) {
		// Create a new row of values to insert. 
		Log.d(TAG, "about to insertMyNote: " + mynote.getKey());
Stop searching for code, let great code find you!  Add Codota to your java IDE