breautek commented on issue #1787: URL: https://github.com/apache/cordova-android/issues/1787#issuecomment-2733856915
Like I said, WebSQL existence will depend on the underlying android system webview that is installed on the device. It is a system level component that is typically updated through Google Play on most devices. Running your project for example with an emulator device running v134, and (unexpectedly) WebSQL feature is still available. It's enabled because Cordova does use https://developer.android.com/reference/android/webkit/WebSettings#setDatabaseEnabled(boolean) which is the webview setting to enable WebSQL feature, but it also states that it is deprecated in API 35 and will become a no-op on all android versions once WebSQL support in chromium is removed. Also tested: |API|Webview|WebSQL API| |36|v128| :white_check_mark: | |36|v135 (Beta)| :x: | |29<sup>1</sup>|v134| :white_check_mark: | |29<sup>1</sup>|v135| :x: | <sup>1</sup> Physical retail device In my testing, and despite Google's own announcements it seems like the WebSQL is still available on v134 but is removed in v135. The physical device is running arm64 to rule out x86 emulators having WebSQL feature enabled for whatever reason. In Google Play, at least in North America/Canada, v135 is only available in the beta channel. You install it in Google Play and switch to it using the Developer Options -> Webview Implementation. The available webview versions may vary by region and by app store. The webview may also be vendor-specific, e.g. Huawei devices could provide their own webview version which may not even be derived from Chromium. > If by chance you have any clue, it would give me some more time to migrate to another alternative. As respectively as I can possibly can, it might be **too** late for migration, as the time to move away from WebSQL was about 15 years ago. My testing above shows it should be possible if you can ship out an update today while users are still running v134, **assuming** their devices uses the AOSP android system webview. This also relies on your users running your update before they update to v135 of the system webview. Once v135 starts shipping, WebSQL appears to be completely gone, and migration if very difficult if not impossible. On my API 29 device, even when v135 is active, I have a `/data/data/<appID/app_webview/databases/Databases.db` (`cordova.applicationStorageDirectory + "/app_webview/databases/Database.db"`) file which is a SQLite database. ``` [norman@norman-workstation ~]$ sqlite3 Databases.db SQLite version 3.46.1 2024-08-13 09:16:08 Enter ".help" for usage hints. sqlite> .tables Databases meta sqlite> SELECT * FROM Databases; 1|https_localhost_0|testdb|Test DB|0 sqlite> ``` I don't know the full structure of how Chrome organizes websql databases, but it looks like it may contain your data. This is likely your best chance at migrating from WebSQL, regardless of the underlying webview. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org