guardianproject/android-database-sqlcipher — Issue #28: Android internal db path
Author: Swarnamahesh
Created: 2011-11-21 08:54:03+00:00
State: open

Hi,

I am trying to create a database with path as default database path in android, with code as below. I get unable to open database file exception. If i give sdcard path it works perfectly, however i do not want my db available in sdcard. Is there a way to make this work internally? (I do not use dbhelper)

Code:

String dbPath = context.getDatabasePath(DATABASE_NAME).toString()
sqLiteDatabase = SQLiteDatabase.openOrCreateDatabase(dbPath, "password", null);

Exception:

info.guardianproject.database.sqlcipher.SQLiteException: unable to open database file

Thanks & Regards,
Swarna