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 :/
Run your app on the emulatorIn the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run. The emulator might take a minute or so to launch for the first time, but subsequent launches will use a snapshot and should launch faster.
Huawei's Phone Clone app is an excellent way of porting applications from a Google Play-enabled device. It won't work for all apps, but it's effective. All Huawei smartphones have this pre-installed, but you will need a separate, Google-Play-enabled device for this to work.
Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK. Android Studio then displays the unpacked APK files, similar to figure 1.
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.
From: https://stackoverflow.com/a/63790263/4730812
Happy coding!
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.
Check Screenshot below:
You can check out the official documentation for a more complete answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With