Hi,
I have a certain scenario where everything is deleted and the app restarts.
I do this with the following:
final File databasePath = getActivity().getDatabasePath(XXXXDbHelper.DATABASE_NAME);
databasePath.delete();
After this I restart the app with ProcessPhoenix
ProcessPhoenix.triggerRebirth(getActivity());
When the app restarts I get the following errors:
11-27 11:56:34.334 3718-3718/? I/Database: sqlite returned: error code = 26, msg = file is encrypted or is not a database
11-27 11:33:28.634 16373-16373/? E/Database: CREATE TABLE android_metadata failed
11-27 11:33:28.634 16373-16373/? E/Database: Failed to setLocale() when constructing, closing the database
net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
at net.sqlcipher.database.SQLiteDatabase.native_setLocale(Native Method)
&
11-27 11:33:28.634 16373-16373/? E/SQLiteOpenHelper: Couldn't open XXXXX.db for writing (will try read-only):
net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
at net.sqlcipher.database.SQLiteDatabase.native_setLocale(Native Method)
What is the problem here? The database file should be deleted synchronously and the application should create a new database, since there is none (like at initial start up.)