android - How to safely read from a database that another process may be using? -
i read data webview.db database created when app uses webview. however, database managed classes package level or not provide in way of access through apis.
since can't share database objects or locks, how can safely read content database without getting "database locked" errors or similar exceptions?
i need read, not need write.
if there no way safely aquire sql queries/cursors on it, there way safely copy actual webview.db file in thread safe manner? there danger of getting corrupt copy?
thanks much
i think locks @ sqlite level, not in java code, should able away opening db , reading without confusing webview.
however, same reason should prepared lock errors , retry queries until lock gone. db locked when webview data altering statements.
webview doesn't put exclusive lock on db whole time it's running, don't see reason that.
Comments
Post a Comment