If you're a web developer looking to start developing a WebView-based Android application, see Getting Started: WebView-based Applications for Web Developers.
For tips on scaling WebView content for mobile devices, see Pixel-Perfect UI in the WebView.
The new WebView also supports remote debugging using the Chrome DevTools.
What version of Chrome is it based on?
The WebView shipped with Android 4.4 (KitKat) is based on the same code as Chrome for Android version 30. The WebView does not have full feature parity with Chrome for Android and is currently given the version number 188.8.131.52.
Will the new WebView auto-update?
Evergreen browsers (like Chrome and Firefox) auto-update and keep their users up to date so they can view the web through a modern feature set. As a developer, this ensures your choices aren’t limited to a lowest-common denominator browser from years ago, but rather are keeping pace with the modern web. Your apps inside a WebView are just as important and deserve a runtime that keeps users up to date. There are large engineering and logistical challenges. We're not quite there yet, but we're working on it.
What is the default user-agent?
The new WebView adds Chrome/version to the user-agent string. Sample old and new user-agent strings:
Old UA: Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
New UA: Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/BuildID) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/184.108.40.206 Mobile Safari/537.36
If you're attempting to differentiate between the WebView and Chrome for Android, you should look for the presence of the Version/X.X string in the WebView user-agent string. Don't rely on the specific Chrome version number, 220.127.116.11 as this may change with future releases.
How do I set the user-agent of the WebView?
You can set the user-agent by using the Java setUserAgentString API method. This method only changes the user-agent string for requests sent by the WebView itself.
You can't set the user-agent string used for
requests always use the default user-agent string.
Does this mean Chrome for Android is using the WebView?
Does the new WebView have feature parity with Chrome for Android?
For the most part, features that work in Chrome for Android should work in the new WebView.
Chrome for Android supports a few features which aren't enabled in the WebView, including:
- WebGL 3D canvas
- Fullscreen API
- Form validation
What does the new WebView mean for developers?
There are some changes that will affect existing apps. Please read the migration guide to understand the small number of changes that might impact you.
How do I enable remote debugging?
See the remote debugging guide.
Does the WebView support the Chrome Apps APIs?
No. The Chrome Apps platform isn't yet supported on Android.
Should I enable hardware acceleration?
Hardware acceleration is enabled by default. If you are explicitly disabling it for older versions of Android you should try enabling it for KitKat based devices and see if it improves performance.
Is any part of the WebView closed source?
No. All the source is available in the Android Open Source Project (AOSP).
How can I contribute to the WebView?
The WebView is an upstream project, so patches should be submitted to the upstream
src.chromium.org repo, not directly to AOSP. For details on contributing
to Chromium , see Contributing Code