title: How to update a database stored in assets folder Android
body: <p>How do you re-copy a database that is stored in the assets folder for an android studio project?</p>
  
  <p>I am using the Android SQLite Assets helper class </p>
  
  <pre><code>package com.acorney.migration;
  
  import android.content.Context;
  import android.database.Cursor;
  import android.database.sqlite.SQLiteDatabase;
  import android.database.sqlite.SQLiteQueryBuilder;
  
  import com.readystatesoftware.sqliteasset.SQLiteAssetHelper;
  
  /**
  * Created by acorney on 25/07/2016.
  */
  public class databaseHelper extends SQLiteAssetHelper {
  
  private static final String TAG = SQLiteAssetHelper.class.getSimpleName();
  private static final String DATABASE_NAME = "peopleDatabase.db";
  private static final int DATABASE_VERSION = 1;
  
  public databaseHelper(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }
  </code></pre>
  
  <p>And I create an instance of it in my MainActivity </p>
  
  <pre><code>databaseHelper dataB;
  dataB = new databaseHelper(this);
  </code></pre>
  
  <p>This, I think, creates an empty database in data/data and copies the database from Assets into it</p>
  
  <p>However, I have updated the database from outside the app (using SQLite browser) and saved it back to the assets folder.
  How could I copy the database's updates into the application?</p>
  
  <p>Eventually, the app needs to read and write to this database - so that changes are saved to the database in the assets folder</p>
  
  <p>And, when the app starts up, the app should just create a new instance of the database in the assets folder.</p>
  
  <p><strong>Basically - I want all database changes to happen in the assets folder - is this something that can be done?</strong></p>
  
  <p>Thank you for your help</p>