Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

# Project target.
target=android-8
android.library=true
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,15 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
public void setForcedUpgradeVersion(int version) {
mForcedUpgradeVersion = version;
}

/**
* Returns the full database path. Useful when attaching other databases
*
* @return Full Database Path
*/
public String getDatabasePath(){
return mDatabasePath + "/" + mName;
}

private SQLiteDatabase createOrOpenDatabase(boolean force) throws SQLiteAssetException {
SQLiteDatabase db = returnDatabase();
Expand All @@ -363,7 +372,7 @@ private SQLiteDatabase createOrOpenDatabase(boolean force) throws SQLiteAssetExc

private SQLiteDatabase returnDatabase(){
try {
SQLiteDatabase db = SQLiteDatabase.openDatabase(mDatabasePath + "/" + mName, mFactory, SQLiteDatabase.OPEN_READWRITE);
SQLiteDatabase db = SQLiteDatabase.openDatabase(getDatabasePath(), mFactory, SQLiteDatabase.OPEN_READWRITE);
Log.i(TAG, "successfully opened database " + mName);
return db;
} catch (SQLiteException e) {
Expand Down
Binary file modified lib/android-sqlite-asset-helper.jar
Binary file not shown.