Used WebView/Chrome on Android, question regarding (possibly misleading) part of documentation #5756
-
I have a question regarding the WebView used by Capacitor and a possibly misleading part of the documentation (that I have also seen mentioned in some other issues) where it says:
As far as I could determine from the code and some experiments it seems to me like Capacitor is actually always using a WebView (and not Chrome on Android 7+). As Chrome is not bundled with Capacitor it anyway could only be used if Chrome was installed, but I don't think there even is a way to use an installed Chrome inside another app the way it would be needed for Capacitor. So after some research I think that this part of the documentation might refer to the specific implementation of the WebView, which has changed over time on Android:
So I think that the mentioned part of the documentation might refer to that change in Android 7. But then this part of the documentation is a) not up to date, b) misleading (because Capacitor has no way to make sure Chrome is used, this depends entirely on the specific Android system) and c) I don't understand why this information would be relevant. I think information about the used rendering engine to display the web content is entirely relevant, but the relevant change here came already with Android 5 (switch from WebKit to Blink/Chromium). That part of the documentation made me further believe that to find out if a certain Web API is available I have to look for "Chrome Android" and not for "WebView Android" in the compability tables (e.g. for the Share API which is available in Chrome but not in a WebView – regardless of wether the concrete WebView implementation is given by the Chrome package or a sperate WebView package). So I spend some time trying to figure out why it did not work when it should be working on Chrome (and it was clearly stated in the documentation that Capacitor uses Chrome on every Android 7+). So my questions basically are:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, the docs are out of date, they should include the Android 10+ using the System WebView again, and also specify that it's not "chrome", but a WebView provided by chrome as it's not the same thing, but that information is there so users know what package they should update to get latest WebView version and there is no "Chrome WebView" separate package, users have to update "Chrome" package to get latest WebView. About the APIs not being available, that's done by chromium team that disable some APIs on the WebView. |
Beta Was this translation helpful? Give feedback.
Yeah, the docs are out of date, they should include the Android 10+ using the System WebView again, and also specify that it's not "chrome", but a WebView provided by chrome as it's not the same thing, but that information is there so users know what package they should update to get latest WebView version and there is no "Chrome WebView" separate package, users have to update "Chrome" package to get latest WebView.
About the APIs not being available, that's done by chromium team that disable some APIs on the WebView.
Would be helpful if you report those kind if issues to chromium team so maybe they change their minds and make those APIs available in the WebView too, I've reported a few w…