{"id":359,"date":"2022-11-29T19:52:26","date_gmt":"2022-11-29T16:52:26","guid":{"rendered":"https:\/\/atonomik.com\/testat\/?p=359"},"modified":"2023-05-08T19:34:06","modified_gmt":"2023-05-08T16:34:06","slug":"huawei-android-app","status":"publish","type":"post","link":"https:\/\/www.atonomik.com\/en\/blog\/huawei-android-app\/","title":{"rendered":"Top Five Points: Support Huawei Mobile Services in Android App"},"content":{"rendered":"
\n

We all know that nowadays an Android App depends on at least one Google Mobile Service \ud83d\ude09<\/p>\n

To distribute the Android Project to Huawei AppGallery, the project must be fully integrated with the HMS (Huawei Mobile Services) APIs. Although Huawei makes things easier by providing documents and tools to achieve this integration, but various infrastructure and configurations are required for those who will do it for the first time.<\/p>\n

Here we will cover the points you will encounter, you can already find the official details at\u00a0developer.huawei.com<\/a>.<\/p>\n<\/div>\n

<\/div>\n
\n

1. AppGallery Connect<\/h2>\n

As in the Google Play Console, you must first create a Huawei Console account. Here\u2019s an identity verification system that takes a few business days. It is impossible to proceed without waiting for the verification to be complete.<\/p>\n

After gaining access to the account, you must create a project and a linked app in AppGallery. You have to enter the package name and credentials of the Android Project in the same way.<\/p>\n

After you are done, you can manage the required API permissions and analytics reviews of the project.<\/p>\n

\n
\n
\"\"<\/picture><\/div>\n<\/figure>\n
\n
\"\"<\/picture><\/div>\n<\/figure>\n<\/div>\n<\/div>\n
<\/div>\n
\n

2. API Activations<\/h2>\n

Just like in Firebase, Huawei offers various APIs such as PushKit, Remote Configuration, Analytics, Location, and Map. When adding Huawei support to your project, it will be important to configure them the same as Google services. For example, you should add the Remote Config parameters appropriately or you should support the backend environment, you made with Firebase Push Notification, for PushKit.<\/p>\n

\n
\"\"<\/picture><\/div>\n<\/figure>\n

Even if there is no need for many changes on the Android coding side. It would be useful to review\u00a0Huawei Documents<\/a>\u00a0while configuring the API.<\/p>\n<\/div>\n

<\/div>\n
\n

3. HMS Toolkit<\/h2>\n

HMS Toolkit is an assistant tool that offers convertor, analysis, configuration, and examples that you can use on Android Studio. After installation, you must connect to your account via the Configuration Wizard. You must provide the kits, the project uses, and a certificate. To create a new certificate or use your existing certificate, you can read the article published on the\u00a0Huawei Medium page<\/a>.<\/p>\n

\n
\n
\"\"<\/picture><\/div>\n<\/figure>\n
\n
\"\"<\/picture><\/div>\n<\/figure>\n<\/div>\n

Then you can start the process to add HMS support with the Convertor tool. Here, if your project includes multi-module support or is a library, tick the appropriate options.<\/p>\n<\/div>\n

<\/div>\n
\n

4. Converting Strategies<\/h2>\n

Huawei offers us two main conversion policies as Add HMS API(G+H) and To HMS API(G2H).<\/p>\n