I'm using Android 6.0 and SQLite 3.8.10.2 I have a problem with changing journal mode for my db connection.
Cursor cursor = null;
cursor = mDatabase.rawQuery("PRAGMA journal_mode", null);
Boolean d = cursor.moveToFirst();
String gg = cursor.getString(0);
cursor.close();
mDatabase.rawQuery("PRAGMA journal_mode=DELETE", null);
cursor = mDatabase.rawQuery("PRAGMA journal_mode", null);
Boolean dd = cursor.moveToFirst();
String xx = cursor.getString(0);
cursor.close();
First I check journal_mode
and value is 'PERSIST'
Then I set journal_mode=DELETE
and check again, but value of xx
variable is still PERSIST.
I need to change journal_mode because I have to sync db between multiple devices.
Thanks