All Products
Document Center

Adapt to Android 12

Last Updated: Oct 18, 2021

Google has released Android 12 Beta 5 on September 9, 2021. This version is the last Beta version of Android 12 before the official release. As a basic library, mPaaS has been adapted on the 10.1.68 baseline. and later versions have completed the adaptation to Android 12 Beta 5. Prior to the mPaaS adaptation, the mPaaS SDK was affected on Android 12 Beta 5 devices that the HTML5 container could not launch the UC kernel.

Upgrade the SDK or components

Use the mPaaS plug-in to upgrade the mPaaS SDK or components.

  • If the baseline version used is already 10.1.68, simply upgrade to the latest version. See 10.1.68 release notes.
  • If you are using baseline version 10.1.60 or earlier versions, upgrade to 10.1.68 and update to the latest version. There are no plans to adapt Android 12 to mPaaS 10.1.60 and earlier versions at this time.

Start UC kernel

On the Android 12 system, you need to use a specific version of the UC kernel, and add configuration to turn on the UC kernel. Without the following adaptations, the H5 container will enable the system WebView by default on the Android 12 system.

Use specific version of UC kernel

Add dependencies under the dependencies node in the build.gradle of the main module (in the Portal project under the Portal&Bundle access method).

  1. implementation('') {
  2. force = true
  3. }

When using mPaaS Inside and Protal&Bundle access methods, you also need to remove the original UC core in the SDK, and add the following content to the build.gradle of the main module (Protal&Bundle access method is in the Portal project):

  1. mpaascomponents {
  2. excludeDependencies = [
  3. ""
  4. ]
  5. }

Add configuration to enable UC kernel on Android 12

Create a custom_config.json file under the config directory in assets and add the following content to the file.

  1. [
  2. {
  3. "value":"{\"h5_enableExternalWebView\":\"YES\",\"h5_externalWebViewSdkVersion\":{\"min\":11,\"max\":31}}",
  4. "key":"h5_webViewConfig"
  5. }
  6. ]

Perform regression Test

Upgrading the UC kernel may be accompanied by changes in some browser features. Please perform regression tests on the related services using UC browsers.

Process custom library

Each component of version 10.1.68 has incorporated customized requirements. If your dependencies include customized libraries, you need to deal with the following conditions:

  • If you are upgrading from a lower version of the SDK (such as 10.1.60) to version 10.1.68, your custom library may need to be re-customized based on the new version, please submit a ticket or contact mPaaS support staff to confirm.
  • If you are already using version 10.1.68, you only need to update some components. See Adaptable library list for Android 12 updates below to check whether your custom libraries are included in it.
  • If not included, you can continue to use the custom library.
  • If included, your custom library may need to be re-customized, please submit a ticket or contact mPaaS support.

Adaptable library list for Android 12 updates

  • nebulauc
  • multimediabiz