All Products
Search
Document Center

Mobile Platform as a Service:Adapt to Android 12

Last Updated:Feb 24, 2023

This article describes the adaptation work that users need to do for Android 12 when using the mPaaS 10.1.68 version baseline.

Google has released Android 12 on October 4, 2021. As a basic library, mPaaS has been adapted on the 10.1.68 baseline. 10.1.68.37 and later versions have completed the adaptation to Android 12. Prior to the mPaaS adaptation, the mPaaS SDK was affected on Android 12 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).

implementation('com.alipay.android.phone.wallet:nebulaucsdk-build:3.22.2.18.210803145558@aar') {
    force = true
}

When using 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):

mpaascomponents {
    excludeDependencies = [
            "com.alipay.android.phone.wallet:nebulaucsdk-build"
    ]
}

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.

[
  {
    "value":"{\"h5_enableExternalWebView\":\"YES\",\"h5_externalWebViewSdkVersion\":{\"min\":11,\"max\":31}}",
    "key":"h5_webViewConfig"
  }
]

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 search for group number 41708565 with DingTalk to join DingTalk group to 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 search for group number 41708565 with DingTalk to join DingTalk group to contact mPaaS support.

Adaptable library list for Android 12 updates

  • nebulauc

  • multimediabiz