All Products
Search
Document Center

Mobile Platform as a Service:Integrate mPaaS kernel

Last Updated:Dec 18, 2024

Integration instruction

Note

Integration of the mPaaS kernel requires a baseline version of 10.2.3.55 or higher.

  1. Add the new mvn configuration, refer to manually configure Maven repository.

  2. Add the following configuration into the app's build.gradle file. For specific SDK version numbers, please refer to: mPaaS kernel version release notes.

    android {
      ...
       configurations {
            all*.exclude group: 'com.mpaas.mriver', module: 'mriveruc-build'
            all*.exclude module: 'nebulaucsdk-build'
            all*.exclude module: 'nebulauc-build'
       }
    }
    
    dependencies {
      ...
      api 'com.mpaas.myweb:mpaasmywebapi-build:xxx@aar'
      api 'com.mpaas.myweb:mpaasmyweb:xxx@aar'
      
      // The mini program container must be added, do not add if not using mini program
      api 'com.mpaas.mriver:mrivermyweb-build:xxx@aar'
      
      // The H5 container must be added
      api 'com.mpaas.nebula:nebulamyweb-build:xxx@aar'
    }
  3. Add obfuscation configuration.

    -keep class com.alipay.mywebview.** {*;}
  4. Apply for authorization code and configure it in the AndroidManifest.xml as follows.

    <meta-data
                android:name="MPKernelAuthKey"
                android:value="xxx" />
    Important

    The information required for the application includes the Package name of the Apk and the Signature digest SHA256.

How to obtain the signature digest

Method 1: Use apksigner command from the Android SDK.

apksigner verify -v --print-certs test.apk | grep 'certificate SHA-256'

// Output example
Signer #1 certificate SHA-256 digest: 389b49f7832f53e9017923220aa85e14dfaa4886ecd7428818bf339543cf498a

Method 2: Use keytool.

keytool -printcert -jarfile test.apk | grep SHA256

// Output example 
 SHA256: A0:02:3F:10:D8:B9:8F:FF:E2:57:4B:47:A6:46:30:0C:67:98:5E:BF:5A:98:BB:D5:25:32:DE:E6:F8:91:27:07

Verify whether the kernel application is successful

Filter the log webview version. If the version number is 0.11.xxx, it proves that the kernel application is successful.

image.png

For customers who used UC kernel

If the mPaaS App has been integrated to the UC kernel before, you need to confirm the following points:

  • Whether specific logic customization of the kernel has been done. If so, it needs to be re-implemented according to the new interface. You can determine this by searching whether the code contains import com.uc.xxxxx.

  • The new kernel version no longer supports Nebula Mini Program. Users of Nebula Mini Program should upgrade to the new Mini Program container.

  • Restore the related functions, mainly including:

    • For H5 container components (including embedded H5 in Mini Programs), kernel-related functions need to be restored. This includes all functions of H5 pages and dynamic switching of system kernel scenarios.

    • For Mini Program components, the Mini Program functions need to be restored. This includes rendering, components, API, plugins, etc.