My Android app is using a database through an API packaged in an external JAR. Since the JAR is opening/updating/closing the SQLite database file, do I need to make sure it uses its own package name instead of my own? Im getting errors where it fails to open the database file and Im guessing its because the package name Im telling it to use is incorrect: should it be using the package name in the JAR file?
Code that is opening the database:
public AndroidSQLiteDataStore() throws SQLiteException {
Logger logger = LoggerFactory.getDefaultInstance();
logger.information(TAG, "OPEN CONNECTION TO DATABASE " + Config.BN_ANDROID_DB_PATH);
try {
this.db = SQLiteDatabase.openDatabase(Config.ANDROID_DB_PATH, null, SQLiteDatabase.CREATE_IF_NECESSARY | SQLiteDatabase.OPEN_READWRITE);
} catch (SQLiteException e) {
logger.error(TAG, e.toString());
throw e;
}
}
Also tried poking around with the shell:
$ adb shell
$ ls
sqlite_stmt_journals
cache
sdcard
etc
system
sys
sbin
proc
logo.rle
init.sapphire.rc
init.rc
init.goldfish.rc
init
default.prop
data
root
dev
$ cd data
$ ls
opendir failed, Permission denied
$