" when write-ahead logging is enabled (by calling this method), write operations occur in a separate log file which allows reads to proceed concurrently. While a write is in progress, readers on other threads will perceive the state of the database as it was before the write began. When the write completes, readers on other threads will then perceive the new state of the database."
This
PR
to improve how to handle the deadlcok issue http://tleyden.github.io/blog/2013/11/14/investigating-an-android-sqlite-threading-deadlock/However, the implementation of Qiscus Chat SDK might be considered as well.
Reference: Based on this article enable WAL allow to read the database during a transaction process https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase#enableWriteAheadLogging()
" when write-ahead logging is enabled (by calling this method), write operations occur in a separate log file which allows reads to proceed concurrently. While a write is in progress, readers on other threads will perceive the state of the database as it was before the write began. When the write completes, readers on other threads will then perceive the new state of the database."