So, I recently migrated to a Oneplus 6t running on Android 9.0 I had a DB file with me which I read and write to my current application DB. I checked using the SqliteManager that all the data is intact and correct. The queries are working fine too. The problem is the application cant seem to fetch data from the DB. The cursor is always empty and there is no error in logs related to the Database. The same file when imported in another phone is working fine (although that phone is on android 8.1). Can anyone suggest me anything how to fix this?
Asked
Active
Viewed 141 times
1
-
Maybe this will be of some help: https://stackoverflow.com/questions/51930153/unable-to-open-database-in-android-pie-android-9 – Bilal Naeem Nov 03 '18 at 18:41
1 Answers
0
Add below code in your SQLiteOpenHelper class.This should work for pie
@Override
public void onOpen(SQLiteDatabase db) {
super.onOpen(db);
db.disableWriteAheadLogging();
}

hari86
- 659
- 2
- 16
- 28