All Products
Search
Document Center

Mobile Platform as a Service:mPaaS Compatibility with targetSdkVersion 31

Last Updated:Jul 01, 2026

mPaaS 10.2.3.4 and later support targetSdkVersion 31. To upgrade, use Use mPaaS plug-in to update the SDK to 10.2.3.4 or later, and then follow the adaptation and regression steps below.

Adapt to targetSdkVersion 31

Prerequisites

Change the value of targetSdkVersion

Native AAR integration mode

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

Componentized integration mode

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

  • In the Bundle project, the targetSdkVersion value can remain unchanged, but it must be less than or equal to the value in the Portal project.

Securer component export

For applications targeting targetSdkVersion 31, you must explicitly declare the exported attribute for any Activity, Service, or BroadcastReceiver that contains an intent-filter.

Social Sharing

  • To integrate sharing to QQ, add the following configuration in AndroidManifest.xml:

    <!-- To share to QQ, target 31 adaptation needs to be merged. -->
    <activity
          android:name="com.tencent.tauth.AuthActivity"
          android:launchMode="singleTask"
          android:exported="true"
          android:noHistory="true">
          <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <!-- The QQ share ID is in the format of "tencent + QQ share ID". You need to ensure that the QQ share ID is the same as that configured in the code, otherwise the sharing callback may be exceptional.-->
          <data android:scheme="xxxxx" />
          </intent-filter>
    </activity>
  • To integrate sharing to Weibo, add the following configuration in AndroidManifest.xml:

    <!-- To share to Weibo, target 31 adaptation needs to be merged. -->
    <activity
          android:name="com.sina.weibo.sdk.share.WbShareResultActivity"
          android:configChanges="orientation|screenSize|keyboardHidden"
          android:exported="true"
          android:launchMode="singleTop"
          android:theme="@android:style/Theme.Translucent.NoTitleBar"
          tools:replace="configChanges">
          <intent-filter>
              <action android:name="com.sina.weibo.sdk.action.ACTION_SDK_REQ_ACTIVITY" />
              <category android:name="android.intent.category.DEFAULT" />
          </intent-filter>
          <intent-filter>
              <action android:name="com.sina.weibo.sdk.action.ACTION_SDK_REQ_STORY" />
              <category android:name="android.intent.category.DEFAULT" />
          </intent-filter>
    </activity>

Message Push Service (MPS)

  • To integrate Message Push Service (MPS), see Integrate MPS into Android to add the exported attribute to com.alipay.pushsdk.BroadcastActionReceiver.

  • To integrate Huawei push HMS5 by vendor channels, see Huawei push document to upgrade to the adapted version. If the version cannot be upgraded for the time being, add the following configuration in AndroidManifest.xml:

    <!-- To use Huawei push, target 31 adaptation needs to be merged. -->
    <receiver
        android:name="com.huawei.hms.support.api.push.PushMsgReceiver"
        android:directBootAware="true"
        android:exported="true">
        <intent-filter>
            <action android:name="com.huawei.intent.action.PUSH_DELAY_NOTIFY" />
            <action android:name="com.huawei.intent.action.PUSH" />
        </intent-filter>
    </receiver>
    <receiver
        android:name="com.huawei.hms.support.api.push.PushReceiver"
        android:directBootAware="true"
        android:exported="true">
        <intent-filter>
            <action android:name="com.huawei.android.push.intent.REGISTRATION" />
            <action android:name="com.huawei.android.push.intent.RECEIVE" />
        </intent-filter>
    </receiver>      	
  • To integrate Huawei push HMS2 by vendor channels, see Integrate Huawei push - HMS2.x to add the exported attribute for com.huawei.hms.update.provider.UpdateProvider and com.alipay.pushsdk.thirdparty.huawei.HuaweiPushReceiver.

  • To integrate OPPO push by vendor channels, see OPPO version release notes to upgrade to the adapted version, and see OPPO push to add the exported attribute to CompatibleDataMessageCallbackService and DataMessageCallbackService.

UC kernel

To capture crash events from the UC kernel, see Capture crash events of UC kernel to add the exported attribute for ClientMonitorWakeupReceiver.

Regression test

Include Android 12 or later devices in the full regression test. Focus on the following components and features if they are in use.

Component

Test item

Mobile Gateway Service (MGS)

  • Check whether mPaaS GMSSL works properly.

Message Push Service (MPS)

  • Check whether messages can be pushed through vendor channels successfully.

  • Check whether tapping a message redirects to the correct page.

Mini program

  • Check whether the Bluetooth API works properly.

Mobile Delivery Service (MDS) upgrade

  • Check whether the upgrade package can be downloaded and canceled normally.

Social Sharing

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

Intelligent Dual-Recording System

  • Check whether initialization works properly.

  • Check whether each atomic capability works properly.