I would like to know if there is any effective way to test an app for Huawei Store using an Android Studio emulator.
I tried disabling the Google Play Services, but for some reason Retrofit requests stopped working :/
I would like to know if there is any effective way to test an app for Huawei Store using an Android Studio emulator.
I tried disabling the Google Play Services, but for some reason Retrofit requests stopped working :/
You can use Cloud Debugging of AppGallery Connect to test your app for Huawei Devices. Cloud Debugging tests your app using mainstream Huawei devices provided by Huawei. You can run your app on the latest and most popular Huawei devices to test app functions.
You can check out the official documentation for a more complete answer.
Well, I was trying here to make Retrofit work in this condition and I found a way. I don't know if it is the best solution, but I will post it anyway.
P.S.: Google Play Services is not re-enabled upon reboot.
For most cases, you can simply grab HMS Core APK and install it on emulator or physical device
You do not need for most cases Huawei device. Here is my battle-tested solution.
If you're implementing HMS (Huawei Mobile Services) feature like push notifications, sms retrieving or auth(orization) you can do simply:
- Grab HMS Core APK from: https://www.huaweicentral.com/download-the-latest-huawei-mobile-services-apk/
- Create new or run existing Android emulator via Android Studio or ADB
- Install HMS Core APK downloaded from 1.
- Go to Settings -> Apps & Notifications
- Make sure that HMS Core has required permissions like SMS for SMS retrieving or push notifications
- If you forget about 5., HMS library will return exception "Permissions not enabled"
I am pretty sure that instead of emulator you can use any of physical devices, grab APK and install HMS Core on it.
Happy coding!