The Huawei Mobile Services (Services for Huawei AppGallery), in slang HMS, are more common than you might think, and for the moment, an opportunity to emerge for any app developer. Thats right, because there are not only 10 million reasons that could convince you to bring your application into the Huawei ecosystem but also an audience of potential installations represented by 250 million smartphones in the world.
In this study, therefore, we try to clarify everything related to HMS and the new Huawei ecosystem, which has actually existed for several years but which only now, after the commercial ban by the USA towards the Chinese house, emerges strongly as an alternative to the world of Google (and GMS).
HMS: lets clarify the Huawei ecosystem
For those who do not know what we are talking about we refer mainly to Huawei smartphones which, for some years now, in addition to Googles applications and services (such as Chrome, YouTube, Google Contacts, etc.), have also pre-installed Huaweis complementary applications and services. For example, we find AppGallery which is in all respects an alternative application store to the Play Store, Huawei Video which is an alternative to Google Play Film and the Huawei ID, a sort of reference account as is the Gmail account.
All this Huawei world is called Huawei Mobile Services (HMS), and they represent an increasingly complete alternative to Google Mobile Services.
How to publish an Android app on Huawei AppGallery
Advantages and disadvantages of bringing an app on Huawei AppGallery
First, there is no need to rewrite the application. In fact, we are not developing for another platform (iOS for example, based on a completely different language) but the base, Android, is always the same, consequently the development and compilation of the application do not vary.
A second reason, already hinted at in reality at the beginning of this study, lies in the ease of emerging given that currently the Huawei application store has 55 thousand applications worldwide (November 2019 data), of which the majority (44 thousand) mainly developed for the Chinese market. Competition is therefore low but the number of potential installations is particularly high, we are talking about Huawei which has 250 million users in the world. Finally, bringing an app on the AppGallery as well as being completely free takes very little time and the steps do not differ from doing the same thing on the Play Store.
Among thedisadvantagesthere is the fact of having to maintain a separate release of the application, but considering that the language is the same and the code at 95% will be the same, it is a fairly relative cons, especially in not particularly complex projects.
How to publish an app on AppGallery in 3 steps
1. HMS: why integrate them and why not
The first step is to make a decision about HMS.Is it necessary to integrate them or not in our App?Lets start by saying that to dateit is not mandatory to integrate HMSinstead of GMS, in fact we can load an app on the Huawei store that uses GMS without any problem.
So we have two ways:
- We can publish the APK as we loaded it on the Play Store
- If we have integrated them, we can replace the GMS with the HMS.
The path we have taken, at this moment, is the first for a very simple reason. Right now all Huawei smartphones on the market have GMS, except for Mate 30 Pro, as a result there is a very low risk that the application may not work. The defect of this choice is that if tomorrow there will be many more Huawei smartphones with only HMS on the market our app will not work fully, but we can decide to update it at that later time.
In any case, whether you decide for one or the other way, take as mandatory the fact of having to change the package name to your app by adding at the bottom .Huawei , a very simple step that details you (obviously create a clone project to not miss the main one that you will continue to use for the Google Play Store).
How to change the package name of an Android app:
- Open your development IDE and then the project of your App (I personally use Android Studio);
- Create in the java root of your app (then / src / main / java /) a new folder called huawei.
- Copy and paste all the Java files of your app into this new folder (I do not recommend moving with drag & drop, often it is not successful).
- Then delete the old Java files outside the huawei folder.
- Edit theAndroidManifest.xmlfileand theapp gradleby changing thepackage id(adding .huawei at the bottom).
- Open the Build menu and take a tour of Clean Project and Rebuild Project, if the program gives you some errors there is probably some reference to the old package, correct them and generate the APK.
After this step you will have a release of the app with a modified package name ready for the AppGallery.Know that the latter is a mandatory procedure only if you want to use HMS but I still recommend doing it in advance even if you publish an app with GMS.
2. Register a Huawei developer account
The second step is to register a Huawei developer account, very quick procedure:
- Go tothe dedicated page on Huawei.com
- Register your Huawei ID (to publish an app you need to register a company account) by filling in all the required fields.
- Provide the necessary documentation when requested and complete the registration.
- A verification procedure will start which can take up to one day.
Once registration is complete we can move on to the last phase.
3. Publish the app on the AppGallery
Here too, the procedure is very simple and, if you have already published an application on Android, everything will be particularly familiar to you.
- Go to the dedicated page to create a new App on the AppGallery on the Huawei.com site and log in with the Huawei ID previously registered.
- Press the New button and fill in the required information, obviously by selecting APK.
- At this point you will be presented with the form for editing your App card: fill in all the required data by also uploading the creatives such as the application logo (216 216 pixels) and screenshots following the measures provided.
- Once everything is done, save and it will ask you to load the APK, then save again and send.
- Also in this case the verification by Huawei can take a few hours and, if successful, your application will start to be published.
AppGallery and HMS, resources and things to know
For the moment I have personally considered it not essential to integrate the HMS but obviously I started studying the documentation and I must say that Huawei is doing a good job to simplify the life of the developers.As mentioned, the choice is based on the current market situation where there are no smartphones without GMS (excluding Huawei Mate 30 Pro), however I will soon replace them with HMS to avoid malfunctions on any upcoming devices.
So far, however, I have considered HMS as substitutes for GMS, however I have postponed an important aspect that for some apps could be important: using Huawei Mobile Services means to all intents and purposes to develop optimally for the devices of the Chinese house. This means that specific development kits and APIs are available to exploit the NPUs of Kirin processors (the chips dedicated to machine learning and artificial intelligence) or to be able to fully control and use photographic sensors.
However, if you still have doubts, know that Huawei provides both technical and marketing support to the developers who request it.