an-rahulpandey / cordova-plugin-dbcopy

Copy SQLite Database from www folder to default app database location
Apache License 2.0
89 stars 48 forks source link

Issue on Android 9 *AFTER* succesfull copy on device #62

Closed oudoken closed 5 years ago

oudoken commented 5 years ago

Hello There, I think i've found an issue (at least on Android 9). After the db is copied successfully from /www directory to app_storage/databases/ directory and trying to use cordova-sqlite-ext to read data from database the db seems to be locked and any select return error. In other threads in stackoverflow i've found that in Android 9 the function: this.getReadableDatabase(); Must be followed by: this.close(); After adding this.close(); on line 36 of DatabaseHelper.java the issue is resolved. The strange thing is in some case the database was copied and readed correctly (1/10 of the tries....) Hope can help Bye Rob

oudoken commented 5 years ago

sorry just checked latest version and the issue is already resolved! thanks