I have an android app built used JAVA and XML, now i need to upload app to Huawei store.i am using Google services in my app. what all changes should i do to achieve that?
-
Huawei provide their own services in place of Google's. You'd need to determine if play services are available on the device at run time and initialise that or if not, are huawei's available and initialise those instead. It's a complex process. – Chris Aug 11 '21 at 08:34
2 Answers
As you may know Huawei devices no longer have access to GMS services.
My suggestion is you look into the AppGallery Connect services https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-introduction-0000001057492641 which offer replacement services for GMS. Many of these will work on apps that are uploaded both to the AppGallery and the Play Store so may be a good substitute for your app.
Without knowing the particulars of what you are using with GMS this is the best suggestion I can give.
If for some reason you do need to continue using GMS/firebase for your Play store version you could create a separate build flavor of your app to build a Huawei specific version.

- 30,962
- 25
- 85
- 135

- 3,545
- 11
- 49
- 101
You may refer to this question: Have both GMS and HMS in the project.
It is recommended that you use the G+H approach, Using the G+H approach, you are able to maintain one codebase and decide whether to use GMS or HMS based on the availability of either one.
And could follow this link , which may guide you achieve this from the Google Play to Huawei AppGallery.
You can also use HMS Toolkit Convertor. It supports G+H and G2H conversion. Currently, HMS Toolkit supports Java and Kotlin.

- 32,744
- 15
- 77
- 108