diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-01-31 13:23:21 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-01-31 13:23:21 +0000 |
commit | 86a67409307ff384ee0ef07d677045c6e82e52e8 (patch) | |
tree | 20b862ccca23d2ae983bf81964dc24295742c85f | |
parent | f99483be4192bfef1cbf54eba6f144da586ac25b (diff) | |
download | southamptonuniversitymap-86a67409307ff384ee0ef07d677045c6e82e52e8.tar southamptonuniversitymap-86a67409307ff384ee0ef07d677045c6e82e52e8.tar.gz |
More database stuff.
-rw-r--r-- | src/net/cbaines/suma/DatabaseHelper.java | 5 | ||||
-rw-r--r-- | src/net/cbaines/suma/SouthamptonUniversityMapActivity.java | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/net/cbaines/suma/DatabaseHelper.java b/src/net/cbaines/suma/DatabaseHelper.java index 5a7e9aa..a72faca 100644 --- a/src/net/cbaines/suma/DatabaseHelper.java +++ b/src/net/cbaines/suma/DatabaseHelper.java @@ -186,11 +186,6 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { public void copyDataBase() throws IOException { Log.i(TAG, "Begining copy database"); - // By calling this method and empty database will be created into the default system path - // of your application so we are gonna be able to overwrite that database with our database. - Log.i(TAG, "GetReadableDatabase"); - this.getWritableDatabase().close(); - InputStream myInput = context.getAssets().open(DATABASE_NAME); // Path to the just created empty db diff --git a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java index b5a006d..927f41e 100644 --- a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java +++ b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java @@ -237,6 +237,11 @@ public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<Databa if (useBundledDatabase) { try { + // By calling this method and empty database will be created into the default system path + // of your application so we are gonna be able to overwrite that database with our database. + Log.i(TAG, "GetReadableDatabase"); + helper.getWritableDatabase().close(); + helper.copyDataBase(); Log.i(TAG, "Out of copy database"); } catch (IOException ioe) { |