Symptom
After I chose the Chinese mainland as the release country/region of my app that has integrated the HMS Core SDK and submitted the app for review, my app was rejected, for the language for the update pop-up is English, rather than Chinese.
Analysis
I use Android Studio for app development, and according to my experience, I assumed that the pop-up message is provided in the HMS Core SDK resource files. It might be caused by missing part of the files, so I checked the multi-language resources. Under External Libraries > Gradle:com.huawei.hms:ui-4.0.4.301 > res > value-zh-rCN, I found the values-zh-rCN.xml file and the pop-up message in Chinese, as shown in the following figure.
So why wasn’t it displayed?
Cause
I contacted Huawei technical support (https://developer.huawei.com/consumer/en/support/feedback/#/). Finally, I found a mistake in the multi-language configuration of my project. This is the sample code provided by the official documentation.
And here’s what I wrote.
That’s where the problem is.
I then changed zh to zh-rCN in my code, and used a VIVO phone for testing. I uninstalled HMS Core (APK) from the phone. Then I started my app, and saw the pop-up message displayed in Chinese.
This time, my app was approved.
Summary
Here’s a summary I’ve wrote:
After I chose the Chinese mainland as the release country/region of my app that has integrated the HMS Core SDK and submitted the app for review, my app was rejected, for the language for the update pop-up is English, rather than Chinese.
- As you can see, the following pop-up is in English, which is the reason for rejection.
- The ideal result would look like this.
I use Android Studio for app development, and according to my experience, I assumed that the pop-up message is provided in the HMS Core SDK resource files. It might be caused by missing part of the files, so I checked the multi-language resources. Under External Libraries > Gradle:com.huawei.hms:ui-4.0.4.301 > res > value-zh-rCN, I found the values-zh-rCN.xml file and the pop-up message in Chinese, as shown in the following figure.
So why wasn’t it displayed?
Cause
I contacted Huawei technical support (https://developer.huawei.com/consumer/en/support/feedback/#/). Finally, I found a mistake in the multi-language configuration of my project. This is the sample code provided by the official documentation.
And here’s what I wrote.
That’s where the problem is.
I then changed zh to zh-rCN in my code, and used a VIVO phone for testing. I uninstalled HMS Core (APK) from the phone. Then I started my app, and saw the pop-up message displayed in Chinese.
This time, my app was approved.
Summary
Here’s a summary I’ve wrote:
- If you use Eclipse to integrate the HMS Core SDK, ensure that the related multi-language resource packages are not missing or have not been modified. Generally, the language packages are in the res directory. Remember not to change the package name!
- If you use Android Studio to integrate the HMS Core SDK, make sure:
- The downloaded multi-language resource packages (in the res directory) are not missing or have not been modified.
- If resConfigs has been added to android > defaultConfig, the supported languages are the same as the multi-language packages provided by Huawei, especially for zh-rCN, which is different from the naming on other platforms.