Android 7.0 allows users (via developer options) to choose the implementation of their WebView. The user can choose the standalone WebView or use the Chrome APK to render WebViews. Reference
Since this potentially means those who use WebViews now have two different code bases to worry about, it would be useful to know which implementation is currently selected.
Is there a way to determine what WebView implementation is selected in Android 7?
No, Chrome for Android is separate from WebView. They're both based on the same code, including a common JavaScript engine and rendering engine.
But a wide variety of other Android applications also use it to display web content that isn't a part of the app. The WebView app is based on Chromium, the same open source project that powers the Google Chrome web browser, but it doesn't include all the features present in the full version of Chrome.
If you don't see the app in your app list, you may be running a version of Android where WebView is built in to Chrome instead. If you still have it and want to uninstall it, go to “Settings -> Application Manager -> App Info -> Android System WebView.” The app should be near the top.
Looks like this now available in Android O Preview:
Link: https://developer.android.com/preview/features/managing-webview.html
Starting in Android 7.0 (API level 24), users can choose among several different packages for displaying web content in a WebView object. Android O includes an API for fetching information related to the package that is displaying web content in your app. This API is especially useful when analyzing errors that occur only when your app tries to display web content using a particular package's implementation of WebView.
To use this API, add the logic shown in the following code snippet:
PackageInfo webViewPackageInfo = WebView.getCurrentWebViewPackage(); Log.d(TAG, "WebView version: " + webViewPackageInfo.versionName);
WebView.getCurrentWebViewPackage Documentation: https://developer.android.com/reference/android/webkit/WebView.html#getCurrentWebViewPackage()
There is an appCompat version:
WebViewCompat.getCurrentWebViewPackage(context)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With