6.2 How Poco supports WebView inspections¶
The degree of Poco's support for WebView inspections mainly depends on the compatibility of WebView itself. The currently most compatible WebView solution is
Google-WebView.Some Android phones use other types of WebView support, resulting in Poco's inability to view WebView content, which also causes the problem that current WeChat applets cannot use Poco for testing.
The following will explain how to set up WebView support on Android devices to ensure that we can use Poco to view WebView in ordinary apps.
WebView comes with Android¶
A high-performance webkit kernel browser is built into the Android phone and is packaged in the SDK as a component called WebView.
If we compare a browser to a car, we can think of the webkit kernel as their engine and WebView as the car's engine plus transmission.
The default webview package in Android is named
Relationship between browser and WebView¶
Many browsers with relatively large installation packages have their own kernel built-in or transform other kernels, which has nothing to do with WebView in Android， such as QQ browser, UC browser, Chrome browser, etc.
How to set up WebView on an Android device¶
The Android system comes with an old version of WebView, which is generally upgraded with the system. But there is another way now, which is to install Google-WebView and call it for rendering to make our browsing experience better. At present, many mobile phones have Google-WebView built-in and only need to upgrade. Upgrade method: Download the latest version of Google-WebView package, some systems will prompt you to upgrade during installation, and then please upgrade.
- Click on
Google WebView(most compatible), followed by
AOSP WebView(comes with Android):
WebView selection on WeChat or QQ¶
The built-in browser kernel of WeChat and QQ is not Android's native WebView, but their own
X5 WebView kernel.In fact, it is Tencent Browsing Service (TBS), which may have various problems at present:
For example, if you do not strictly follow fonts.xml to implement multi-word remounting, it will automatically become pseudo-bold after replacing the multi-word weight. The web page load rate is low, and many WeChat pages can be opened normally the second time.
Open debug pages¶
Tencent has retained a TBS debugging page
debugtbs.qq.com. It was originally convenient for developers to install the TBS kernel, but we used its delete function.First, we need to open a debugging page in the built-in browser by sending this URL
http: // debugtbs.qq.com / to any friend in the WeChat chat window, and then click it:
Clear TBS kernel¶
Turn on the
Force Use System Kernel at the bottom and
Clear TBS Kernel, and then restart WeChat / QQ .Enter this page again and click on
View Version Information. If the version information is
0 (null), the setting is successful.
- If the WebView in the system is stuck after switching, it may be a system compatibility problem, you can switch back.
- If you still cannot view the WebView content after switching, it may be that some systems do not support Accessibility for the time being, so Poco is temporarily incompatible.