All Products
Search
Document Center

Mobile Platform as a Service:Adapt mPaaS to targetSdkVersion 30

Last Updated:Apr 26, 2024

The 10.1.68 baseline of mPaaS supports targetSdkVersion 29 and earlier. If your application requires targetSdkVersion 30, use mPaaS plug-in to upgrade the SDK to the custom baseline 10.2.3 and then perform adaptation and regression as shown in the following steps.

Prerequisites

The mPaaS is adapted to targetSdkVersion 28 and 29. For more information, see Adapt mPaaS to targetSdkVersion 28 and Adapt mPaaS to targetSdkVersion 29.

Procedure

  1. Change the value of the targetSdkVersion attribute.

    • In the native AAR access modes

      Open the build.gradle file in the main module of the project and change the value of the targetSdkVersion attribute to 30.

    • In the Portal and Bundle access mode

      Open the build.gradle file in the main module of the Portal project and change the value of the targetSdkVersion attribute to 30. In the Bundle project, the value of the targetSdkVersion attribute can retain unchanged, but the value of the targetSdkVersion attribute must be less than or equal to that in the Portal project.

  2. Specify general configurations.

    Open the build.gradle file in the main module of the project and explicitly enable v2 and v1 signing. Note that in the Portal and Bundle access mode, the project name is Portal.

     android {
       ...
       signingConfigs {
         release {
           storeFile file("myreleasekey.keystore")
           storePassword "password"
           keyAlias "MyReleaseKey"
           keyPassword "password"
           v2SigningEnabled true // Enable v2 signing.
           v1SigningEnabled true // Enable v1 signing.
         }
       }
     }
    
  3. (Optional) Use the video playback feature of the Mini Program.

    If you need to use the video playback feature of the Mini Program you connect to and your application needs to support the 64-bit CPU architecture, modify the AndroidManifest.xml file in the main project and add the following attribute to the "application" node:

    android:allowNativeHeapPointerTagging="false"
  4. Perform a regression test.

    Ensure that Android 11 or later devices are included in the full regression test.

    In the regression test, focus on the components and their features, if in use, shown in the following table.

    Component

    Test Item

    HTML5 Container

    Check whether the offline package can be properly downloaded and used for upgrades.

    Mobile Analysis Service (MAS)

    Check whether all types of monitoring logs can be properly written to local devices and reported.

    Mini Program

    Check whether Mini Program packages can be properly downloaded and used for upgrades.

    Check whether the photo API is normal.

    Check whether the video playback and recording APIs are normal.

    Check whether the map API is normal.

    OCR

    Check whether the OCR feature is normal.

    Location Based Service (LBS)

    Check whether the LBS feature is normal.

    Social Sharing

    Check whether the content can be shared to the supported platforms.

    Device ID

    Check whether the device ID feature is normal.