简体   繁体   中英

Phonegap 3.4 on Android 4.4 with pre-populated SQLite database

I have hybrid Android/phonegap application with phonegap version 2.5 that uses pre-populated SQLite database. On application installation database is copied from assets folder to "/data/data///app_database/file__0/0000000000000001.db" location. Database is not working on Android 4.4. I am trying to upgrade phonegap 3.4, but, while the app is compiles, it still has the same issue. Do I need to use Cordova-SQL Plugin ( https://github.com/brodysoft/Cordova-SQLitePlugin )? Does it work with pre-populated database and if it does - where database is stored? Also I found another plug-in - https://github.com/RikshaDriver/Cordova-PrePopulated-SQLitePlugin - but it said that it has issues with Android 4.4. Thank you for help, Olga

In 4.4+ You should replace the path " /app_database/file__0/0000000000000001.db " with " /app_webview/databases/file__0/1 ". In my app, it works on Android on 4.4.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM