If your application needs to support international users, complete the following tasks:
Multi-language support (English/French/Russian)
-
Verify connected components
Check which components are integrated. Some components — such as those that depend on the Amap software development kit (SDK) or the hotpatching component — may not pass the Google Play review. Replace or remove these SDKs or components as needed. Some third-party SDKs may send data to the Chinese mainland. Remove these components if necessary.
-
Use Blue Shield
Replace Security Guard with Blue Shield and configure multiple Blue Shield images as needed.
Multi-language support
English
Full English support requires mPaaS Android baseline 10.2.3.68 or later. After upgrading, use the Android Locale API to set the language to English explicitly or let it follow the device's system language.
French/Russian
French and Russian language packs are not bundled in the SDK. To get them, join the DingTalk group (ID: 145930007362) or submit a ticket to the mPaaS helpdesk. Once you have the language packs, place the resource files in your project:
res/values-fr/strings.xmlfor Frenchres/values-ru/strings.xmlfor Russian
Then use the Android Locale API to set the language explicitly or let it follow the device's system language.
For international sites, join the DingTalk group (ID: 145930007362) or submit a ticket to the mPaaS helpdesk to request the language packs. Place the resources in your project's res/values-fr/strings.xml and res/values-ru/strings.xml files, then use the Android Locale API to set the language.
Check integrated components
Remove Amap dependencies
Some versions of the Amap Location and Map SDKs may fail the Google Play review. Check if your app integrates any of the following components:
Mini Program
Mriver Mini Program
Native Mini Program (Apsara Stack)
Smart Delivery
These components depend on the Amap Location or Map SDK. Remove their dependencies from your build.gradle file according to your integration method.
Remove Amap SDK dependencies
Native AAR integration
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
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 component
If your app uses the location component, exclude amap-build and amap3dmap-build as described above, but keep lbs-build. Import a Google Play-approved version of the Amap SDK directly from the official Amap website. The following Amap SDK versions are used by mPaaS — use them to find a compatible version that passes the Google Play review:
'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'
Disable hotpatching
Google Play prohibits apps from dynamically distributing executable code. Including the hotpatching component causes app rejection during review. Do not integrate the hotpatching component.
Remove data-transmitting SDKs
The following mPaaS components may send requests to servers in the Chinese mainland. If your app must not transmit data to the Chinese mainland, remove these components:
UC Kernel
Share
Push - Xiaomi
Location
Youku Player
For removal instructions, see Remove Amap SDK dependencies.
Use Blue Shield
Replace Security Guard with Blue Shield
Security Guard is no longer maintained and its compatibility with targetSdkVersion 34 or later is not guaranteed. To replace it with Blue Shield, 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 signature information is stored in a Blue Shield image file bound to your app's signing certificate. If the signing certificate changes, you must regenerate the Blue Shield image; otherwise, request signature verification fails.
If your app uses multiple signing certificates, such as:
Google Play App Signing is enabled
Using the key rotation feature of v3 signatures
Follow these steps to configure multiple Blue Shield images:
Build the APK with signature 1 and generate a Blue Shield image. The default image path is
assets/abs_1222.jpg. Rename the image toabs_1222_jks1.jpg.Build the APK with signature 2 and generate a Blue Shield image. Rename the image to
abs_1222_jks2.jpg.(Optional) If you use Google Play App Signing, download the re-signed APK from the Play Store to generate the Blue Shield image.
-
Your project's
assetsfolder now contains two Blue Shield images:assets/abs_1222_jks1.jpg
assets/abs_1222_jks2.jpg
-
At app startup, call the following API to specify which Blue Shield image to use. Call this API before mPaaS initialization — the
attachBaseContextmethod is the recommended call site. Calling it after initialization has no effect.MPBS.setBSAuthCodeDynamically(String bsAuthCode);This API requires baseline 10.2.3.67 or later.
The
bsAuthCodeparameter is the filename of the Blue Shield image without its extension. For example, if the image isabs_1222_jks1.jpg, passabs_1222_jks1. If you do not call this API, the default image nameabs_1222is used.Call this API before mPaaS initialization. The recommended call site is the
attachBaseContextmethod. The API has no effect if called after mPaaS initialization is complete.
-
Choose the image to load based on the signing scenario. The following examples show how to select the correct image at runtime.
// 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 Android 13+ devices. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { MPBS.setBSAuthCodeDynamically("abs_1222_jks2"); } else { MPBS.setBSAuthCodeDynamically("abs_1222_jks1"); }