title: Using SQLiteOpenHelper helper to include database in Android app
body: <p>In my Android app I want to use a SQLite database which I already created with a different program. I am not planning on writing into the database in the app.
  When I looked into the documentation I could only find instructions on how to create the database in the app after it is installed and then use it.</p>
  
  <p>I then found something called <code>SQLiteOpenHelper</code> which seems like it would do that so I tried to use it.</p>
  
  <pre><code>public class DatabaseHelper extends SQLiteOpenHelper {
      private static int DATABASE_VERSION = 1;
  
      public static final String DATABASE_NAME = "ENUMBERS";
      public static final String TABLE_NAME = "MAIN";
  
      public static final String KEY_ROWID = "_ID";
      public static final String COLUMN_NAME_ENUMBER = "ENUMBER";
      public static final String COLUMN_NAME_NAME = "NAME";
      public static final String COLUMN_NAME_INFO = "INFO";
      public static final String COLUMN_NAME_STATUS = "STATUS";
  
      public DatabaseHelper(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
          String CREATE_MAIN_TABLE = "CREATE TABLE" + TABLE_NAME + "(" + KEY_ROWID + " INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, "
                  + COLUMN_NAME_ENUMBER + " TEXT NOT NULL UNIQUE, "
                  + COLUMN_NAME_NAME + " TEXT, "
                  + COLUMN_NAME_INFO + " TEXT, "
                  + COLUMN_NAME_STATUS + " TEXT) ";
  
          db.execSQL(CREATE_MAIN_TABLE);
      }
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          // Drop old table if there is one
          db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
  
          // Create new table
          onCreate(db);
      }
  }
  </code></pre>
  
  <p>I am still not really sure how to do this now. How do I import my <code>.db</code> file with this and open it? Do I just have to create an instance of the class in the MainActivity and then call <code>onCreate()</code>? But how would I make a SPLiteDatabase class for that <code>.db</code> file?</p>