If your App requires international support, follow these steps:
Multi-language adaptation (English/French/Russian)
Check integrated components
Some components that rely on the Amap SDK or the hotpatching component may not pass the Google Play review. You must replace or remove these SDKs or components. Additionally, some third-party SDKs may send data to servers in mainland China. Remove these components as needed.
Use Blue Shield
Replace Security Guard with Blue Shield. You can also configure multiple Blue Shield images as needed.
Multi-language adaptation
English
The mPaaS SDK supports English starting from baseline 10.2.3.68. Upgrade your baseline to 10.2.3.68 or later. Use the official Android Locale API to manually set the language to English or to follow the phone's system language.
French/Russian
If you also need to support French or Russian, contact the mPaaS technical support engineers to obtain the corresponding language packs. To contact the mPaaS technical support engineers, search for the DingTalk group ID 145930007362 or submit a ticket. Place the resources into the res/values-fr/strings.xml and res/values-ru/strings.xml files of your project. Then, use the official Android Locale API to manually set the language to French or Russian, or to follow the phone's system language.
Check integrated components
Amap Location & Map
Some versions of the Amap Location and Map SDK cannot pass the Google Play review. Check if your App integrates the following components:
Mini Program
Mriver Mini Program
Native Mini Program (Private Cloud)
Mobile Content Delivery Platform
These components depend on the Amap Location or Map SDK. Manually remove the related dependencies based on your integration method.
Remove Amap SDK dependencies
Native AAR integration method
In the build.gradle file of the main module, add the following configuration:
configurations.all {
exclude group:'com.mpaas.group.amap', module: 'amap-build'
exclude group:'com.alipay.android.phone.thirdparty', module: 'amap3dmap-build'
exclude group:'com.alipay.android.phone.mobilecommon', module: 'lbs-build'
}Component-based (Portal & Bundle) integration method
In the build.gradle file of the main module, add the following configuration:
mpaascomponents {
excludeDependencies = [
"com.mpaas.group.amap:amap-build",
"com.alipay.android.phone.thirdparty:amap3dmap-build",
"com.alipay.android.phone.mobilecommon:lbs-build",
]
}Use the Location Based Service component
If you have integrated the Location Based Service component, you must remove amap-build and amap3dmap-build as described previously. Do not remove lbs-build. Instead, import a version from the official Amap website that can pass the Google Play review. The following list shows the Amap SDK versions that mPaaS uses. You can use this list to help you select an identical or similar approved version.
'com.alipay.android.phone.mobilecommon:AMap-2DMap:5.2.1_20190114@jar'
'com.alipay.android.phone.mobilecommon:AMapSearch:6.1.0_20180330@jar'
'com.alipay.thirdparty.amap:amap-location:4.7.2.20190927@jar'Hotpatch
Google Play prohibits Apps from dynamically distributing executable code files. Integrating the Hotpatch component might lead to your App being rejected during review. Do not integrate the Hotpatch component.
Third-party SDK data transmission
Third-party SDKs included in the mPaaS SDK might send requests to servers located in mainland China. If you do not want your App to send data to mainland China, ensure that you have not integrated the following components:
UC Kernel
Share
Push - Xiaomi
Location Based Service
Youku Player
For more information, see the Remove Amap SDK dependencies section.
Use Blue Shield
Replace Security Guard with Blue Shield
Security Guard in the mPaaS SDK is no longer maintained, and compatibility with targetSdkVersion 34 or later is not guaranteed. For more information about replacing it, see mPaaS 10.2.3 supports switching between Security Guard & Blue Shield.
Configure multiple Blue Shield images
mPaaS components use Blue Shield to sign requests sent to the gateway. The signing information is stored in a Blue Shield image, which is bound to the App's signature. If the App's signature changes, you must generate the Blue Shield image again. Otherwise, requests will fail signature verification.
If your App needs to use multiple signatures in different scenarios, such as the following, follow the steps below:
The Google Play re-signing mechanism is enabled.
Using the key rotation feature of v3 signatures.
Follow these steps:
Build the APK using signature 1 and rename the image at the default path
assets/abs_1222.jpgto a name such asabs_1222_jks1.jpg. For more information, see Generate Blue Shield Image.Build the APK using signature 2 and rename this image to a name such as
abs_1222_jks2.jpg. For more information, see Generate a Blue Shield image.(Optional) If you use the Google Play re-signing mechanism, download the re-signed APK directly from the store to generate the Blue Shield image.
Your project's assets folder now contains two Blue Shield images:
assets/abs_1222_jks1.jpg
assets/abs_1222_jks2.jpg
When the App starts, call the following API to specify which Blue Shield image to use:
MPBS.setBSAuthCodeDynamically(String bsAuthCode);This API is supported in baseline 10.2.3.67 and later.
The
bsAuthCodeparameter is the name of the Blue Shield image without the file extension. For example, if the image file isabs_1222_jks1.jpg, passabs_1222_jks1as the parameter. If you do not call this API, the default image nameabs_1222is used.You must call this API before mPaaS is initialized. Call it in the
attachBaseContextmethod. After mPaaS is initialized, any subsequent calls to this API will have no effect.
Determine which image to use as needed. The following code shows an example.
// v3 signatures are supported starting from Android 9. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { MPBS.setBSAuthCodeDynamically("abs_1222_jks2"); } else { MPBS.setBSAuthCodeDynamically("abs_1222_jks1"); } // Apps re-signed by Google Play are distributed to devices with Android 13 or later. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { MPBS.setBSAuthCodeDynamically("abs_1222_jks2"); } else { MPBS.setBSAuthCodeDynamically("abs_1222_jks1"); }