In iOS I use native SQLite library to open database as follows:
sqlite3_open_v2([[self getDatabasePath] UTF8String], &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX
Last flag SQLITE_OPEN_FULLMUTEX is what I'm looking for.
Is there a way in Android to open database like this? I found following:
mDatabase = SQLiteDatabase.openDatabase("dd", null, SQLiteDatabase.OPEN_READWRITE);
I checked class definition and all flags they have is:
public static final int CONFLICT_ROLLBACK = 1;
public static final int CONFLICT_ABORT = 2;
public static final int CONFLICT_FAIL = 3;
public static final int CONFLICT_IGNORE = 4;
public static final int CONFLICT_REPLACE = 5;
public static final int CONFLICT_NONE = 0;
public static final int SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000;
public static final int OPEN_READWRITE = 0;
public static final int OPEN_READONLY = 1;
public static final int NO_LOCALIZED_COLLATORS = 16;
public static final int CREATE_IF_NECESSARY = 268435456;
So, I see nothing like this option in core SQLite library. Any ideas on how I can open DB with this flag?