Skip to content

6.3 How does Poco support WebView?

The degree of support of Poco to WebView mainly depends on the compatibility of WebView itself. Currently, the WebView solution with the best compatibility is Google-WebView. Some Android phones use other types of WebView Support, as a result, Poco cannot view the WebView content. This is why the WeChat mini program cannot use Poco to test. We will explain how to set WebView support on Android devices to ensure we can use Poco to check normal Apps in WebView.

WebView

Android that has WebView in the first place

A high performance webkit kernel browser is built into Android phones, encapsulated in the SDK as a component called WebView. If a browser is a car, then webkit kernel is its motor, WebView is the engine plus transmission. The default webview package in Android is com.android.webview.

Browser and WebView

Usually, browsers with larger packages have their own kernel or a modified version of other kernel which have nothing to do with WebView. For examples, QQ browser, UC browser, Chrome browser, etc.

How to set up Android device on WebView

Android comes with an old version of WebView, which usually upgrades along with the system. But by installing Google-WebView and using it to render will make our experience even better. A lot of phones have already got Google-WebView built in them, you just need to upgrade it. How to upgrade: Download the latest Google-WebView package. Some systems will tell you to upgrade when you install it.

  • Click Developer Options - WebView:

image

  • The best option is Google WebView (best compatibility), followed by AOSP WebView (comes with Android):

image

WebView choice on Wechat/QQ

Problems

The built-in browser kernel in Wechat and QQ is not Android's native WebView, but their own X5 WebView kernel. It's actually the Tencent Browsing Service (TBS), which may have various problems including:

For example, it does not strictly follow fonts.xml to achieve multi-word weight mount, when replacing multi-word weight it will automatically change the weight to pseudo-bold. Page loading speed is low and many Wechat pages will only function properly after opening them for the second time.

To fix these problems, you need to switch to WebView kernel.

Open debug page

Tecent has kept a TBS debug page (debugtbs.qq.com) which is designed to help developers to install TBS kernel, but we will be using its delete function. First we need to open a debug page in the built-in browser by sending this URL (http://debugtbs.qq.com/) to a friend in the chatbox, and then click on it:

image

Clear TBS kernel

image

Turn on Force to Use System Kernel at the bottom, and click Clear TBS Kernel. Restart Wechat or QQ. Enter this page again and click View Version Info. If the version info is 0(null) then you have set it up successfully.

Cautions

  • Any lagging you encounter after switching to WebView is probably a system compatibility issues. Just switch it back.
  • If you still cannot view any WebView content after switching the kernel, it is probably because the system does not support Accessibility thus making Poco incompatible.