title: SqlCipher attempt to write a readonly database
body: <p>I am attempting to implement Sqlcipher for android. I am using this for multiple activities and as such am extending SQLiteOpenHelper {}. </p>
  
  <p>However I am </p>
  
  <p>I am aware that the OnCreate override method is not called until the database is accessed for the first time. </p>
  
  <p>My oncreate method looks like </p>
  
  <pre><code>@Override
  public void onCreate(SQLiteDatabase db) {
      SQLiteDatabase.loadLibs(context);
  
  
      File databaseFile = context.getDatabasePath("SyncableDiabetesDatabase.db");
      databaseFile.mkdirs();
      databaseFile.delete();
      mDataBase = SQLiteDatabase.openOrCreateDatabase(databaseFile,SuperKey, null);
  </code></pre>
  
  <p>I am attempting to get the OnCreate Method to call this method by calling this.getWritableDatabase(SuperKey); However when I run this command i receive the error </p>
  
  <p><strong>net.sqlcipher.database.SQLiteException: attempt to write a readonly database: PRAGMA user_version = 1</strong></p>
  
  <p>I'm not exactly sure how this is possible since the command is for a writeable DB</p>
  
  <p>I know sqlcipher is correctly installed, as I can put the DB creation code above outside of OnCreate and the data is stored correctly. However the file is overridden each time the activity is called than, hence why I am moving it to OnCreate which is only called once when I create the tables. </p>
  
  <p>Any insight here would be more than welcome. </p>
  
  <p>I can provide any additional code snippits if needed. </p>
  
  <p>Thank you</p>