
Huawei Mobile Services (HMS) — собственная альтернатива Хуавей сервисам Google. Отныне на гаджетах компании Gmail, YouTube, Chrome, GMaps не работают. И чтобы не потерять своих пользователей разработчики быстро придумали решение проблемы — разработка аналога услуг от Google. Сами китайцы после санкций думали, что на этом бизнес окончен. Но со временем подключив талантливых разработчиков решили разработать способ, который позволит в будущем получить существенную прибыль. Правда для его разработки понадобились большие инвестиции.
Статистические данные показывают, что на конец 2021 года мобильные службы Huawei поддерживают 45 тысяч приложений для Android. Подключить приложения могут не только пользователи Хуавей, но и те, кому доступны услуги Google. Они не противоречат друг другу, но нередко случаются глюки с антивирусами разных поставщиков. Конечно, 45 — небольшая цифра, сравнительно с 3 миллионами у Google Mobile Services, которым придется конкурировать службам Хуавей.

Выпущен пакет Huawei Mobile Services, «убийца» сервисов Google для Android

Как известно, американская корпорация Google из-за американских санкций оказалась вынуждена расторгнуть все соглашения с компанией Huawei, тем самым лишив ее полноценного доступа к операционной системе Android и всему, что касается ее фирменных технологий. Само собой, что это очень мощный удар по китайской корпорации, от которого едва ли возможно оправиться. Теперь на все телефоны от данного производителя запрещено предустанавливать сервисы Google Play, а без таких не работают даже такие популярные программы, как Gmail, YouTube, Chrome, GMaps и прочие. Само собой, что с этим нужно что-то делать, и бренд из Китая сделал. Сегодня, 24 декабря 2019 года, он выпустил на рынок пакет Huawei Mobile Services, представляющий из себя набор специальных сервисов, предназначенных для замены американских GApps. Новейшее программное обеспечение содержит в себе сразу несколько приложений.
Так, пользователям предлагают фирменный магазин приложений, специальный сервис для прослушивания музыки, веб-браузер, а также, кроме того, облачное хранилище. По словам Huawei, с течением времени сервисов в рамках пакета HMS станет больше, а сейчас для нее важно запустить данный пакет как на китайском рынке, так и на международном, сделав его доступным для всех пользователей без каких-либо исключений и сложностей. Начиная с сегодняшнего дня все желающие могут стать участниками тестирования пакета Huawei Mobile Services, тем самым получив доступ к приложениям, доступным в его рамках, в числе первых. В ближайший год китайская корпорация намерена сделать так, чтобы ее фирменный пакет программ оказался идентичен таковому в Google Play Services.

Конечно, заменить жителям России, Европы и других стран мира сервисы Google едва ли возможно, потому что такие пользуются невероятно большой популярностью. Тем не менее, возможно с течением времени, разработки Huawei также смогут стать востребованными по всему миру, пускай в настоящее время во все это и верится с очень большим трудом. В любом случае, компании стоит отдать должное за то, что она не сдается, а стремительно двигается вперед, делая все ради того, чтобы ее фирменная продукция становилась лучше несмотря ни на какие санкции и все подобное. Еще год назад таких проблем попросту не было, потому что власти США ввели санкции в отношении этого производителя лишь в мае.

Уже в первом квартале 2021 года в рамках HMS пользователям будут доступны целых шесть сервисов, в том числе фирменная платежная система. Все они будут работать как одно единое целое, а уже в скором будущем владельцам смартфонов Huawei окажется доступна почтовая служба собственной разработки, которая станет конкурентом для Gmail. Как будут разворачиваться события в данной сфере покажет время, но вполне себе очевидно, что чем сильнее конкуренция на рынке, тем лучше для всех пользователей, потому что за счет этого качество всех сервисов улучшается, ведь компании активно конкурируют друг с другом, стремясь обеспечить лучший пользовательский опыт.
Недавно стало известно о том, что флагман Huawei P40 заряжается за 45 минут и работает неделю без подзарядки.
Внимание! До 6 декабря все желающие могут бесплатно получить Xiaomi Mi Band 5, потратив на это всего 3 минуты.
Канал AKKet. com в Telegram
Получайте уведомления о новых материалах прямо в мессенджере — на iOS, Windows, Android и Linux. AndroidGoogleHMSHuaweiСервисы
Какие приложения совместимы с HMS?
После установке приложений пользователю будут доступны такие программы:
- Huawei Themes;
- Huawei Screen Magazine;
- Huawei Browser;
- Huawei Mobile Cloud.
Face Unlock — разблокировка по лицу на смартфонах Хонор и Хуавей
Обратите внимание, что Huawei Video сотрудничает с партнерами, которые заняли важные места на рынке. Благодаря этому юзеры могут свободно просматривать различные программы. Но отсутствует Youtube, который, впрочем, можно смотреть через браузер.
Юзеры смогут читать множество книг, благодаря сервису Reader — от классики до популярной литературы. Информационный центр поддерживает 30 языков в 82 странах и регионах мира. Как бонус, пользователь может подключить интеллектуальные напоминая, что позволит ему быть в курсе всех важных событий. И как бонус, возможность настройки push-рассылки — нового канала коммуникации с пользователями веб-ресурсов. Работает даже без подключения к интернету.
Что делать?
Если вы столкнулись с такой ситуацией, то выполняйте следующие действия в указанном порядке:
- перезапустите телефон, и убедитесь, что пункты «Дата», «Время» и «Регион» выставлены правильно;
- зайдите в раздел «Все программы», и проверьте наличие обновлений;
- если обновления есть, то подключитесь к точке доступа wi-fi и установите их;
- если неполадка до сих пор есть, открываем настройки, спускаемся в конец списка, и выбираем пункт «Восстановление и сброс»;
- подтвердите действие, и дождитесь окончания процесса переустановки.
Если и это не помогло, то обратитесь в сервисный центр Huawei или магазин, в котором вы покупали товар.
Плюсы и минусы
«Стоит ли ожидать улучшение ситуации?» — открытый вопрос. Америка несколько снизила санкции и позволяет некоторым американским компаниям сотрудничать с китайцами. Но осложнения могут произойти в любой момент. На 2021 год устройство от компании Хуавей были проданы на 10% больше, чем у Samsung. Это говорит о том, что, невзирая на изменения и трудности в работе, множество потенциальных покупателей доверяют качеству компании.
Если у Вас остались вопросы или есть жалобы — сообщите нам
Как переключать интернет между симками Хуавей и Хонор: инструкция
Состав HMS
В дальнейшем с развитием количество компонентов может увеличиться.
- Huawei ID — учетная запись, где все ваши личные данные, контакты, сообщения, пароли Wi-Fi будут синхронизированы.
- Mobile Cloud — облако, работает при наличии активной учетной записи. Поддерживается резервное копирование фото, видео, контактов, данных календаря, заметки и прочее. Бесплатно дается 5 гб, расширить можно до 2 тб. Посмотреть резервные данные можно авторизовавшись на cloud.huawei.com.
- Assistant — виртуальный помощник, позволяющий легко посмотреть список установленного ПО, заметки, сообщения электронной почты, записи календарная. Также присутствуют персонализированные новости из разных источников.
- Themes — темы оформления, уникальными могут быть шрифты, значки, экран блокировки, обои.
- Music — прослушивание музыки онлайн, присутствует платная подписка от одного месяца и бесплатный тестовый период. Альтернатива Apple Music и Google Play Музыка.
- Video — проигрыватель видео по умолчанию. По информации магазина Google — поддерживает онлайн-сервисы потокового видео, но пока только в Испании и Италии (в будущем будет больше стран). Большинство онлайн-контента — платный, некоторый — бесплатно, также есть некая зона проката фильмов.
- Browser — браузер, поддерживаются голосовые команды.
Учетная запись, как и в Google — основное и первое что нужно создать для работы сервисов:
Как удалить Huawei Mobile Services
Если решили, что аккаунт Huawei уже не к чему, то нужно выполните такой переход — «Настройки»/«Вход через аккаунт Huawei»/«Конфиденциальность»/«Удалить аккаунт».
Учитывайте, что после удаления персональные данные будут удалены с сервера без возможности восстановления. А резервные данные удаляются после 6 месяцев.
Если не нашли пункт «Удалить аккаунт», то откройте в магазин приложений Google Play и обновите Huawei Mobile Services, повторите переход. Ситуация на рынке с телефонами компании несколько озадачила пользователей, которые начали сомневаться в рациональности их использования. Но трудолюбие китайских разработчиков, их упорство и оригинальность убеждают в том, что американские санкции — не только не преграда, но отличная мотивация для развития.
Huawei Mobile Services – альтернатива сервисов Google
Часто появляющиеся термины Huawei без Google или Huawei без Android не совсем точны, и даже вводят в заблуждение. Купив смартфон от этого производителя, мы получим экосистему мобильных услуг Huawei, а точнее Android 10 с интерфейсом EMUI.

На первый взгляд может показаться, что изменений не произошло. И только при внимательном изучении можно заметить отсутствие стандартных предустановленных приложений от Google, на которые Huawei в настоящее время не имеет прав. Но сама система Android все еще может использоваться.
Горячая линия Huawei в России
В начале этого года Huawei расширили сеть авторизированных сервисных центров, осуществляющих гарантийный ремонт продукции компании. Если в первом квартале 2012 года подобные сервисные центры были только в Москве, то сейчас их количество по всей стране возросло 48. Подробную информацию о СЦ, осуществляющих гарантийный ремонт техники Huawei в городах России и их адреса и телефоны вы сможете найти на официальном российском сайте или в разделе сервисное обслуживание на нашем сайте.
Напомним, что в Россию поставляются мобильные устройства Huawei следующих категорий:
- мобильные телефоны и смартфоны
- планшетные ПК
- модемы
При этом данные девайсы могут поставляться на отечественный рынок, как с гарантией производителя, так и с гарантией дистрибьюторов и операторов связи (брендированные гаджеты). Поэтому перед обращением в сервисный центр вам необходимо проверить условия сервисного обслуживания в гарантийном талоне, прилагаемом к устройству. Если в нем указано, что ответственность по гарантийному обслуживанию возложена непосредственно на компанию Huawei, то вам необходимо обращаться в авторизированный сервисный центр. В противном случае по вопросам гарантийного сервиса стоит обращаться в организацию, продавшую вам гаджет.

Теперь что касается непосредственно горячей линии. Начиная с 3 сентября 2012 года начал работу российский call-центр компании. Любой желающий может позвонить по телефону горячей линии — 8-800-700-1606 и задать свои вопросы относительно технической поддержки и сервисного обслуживания, а также любые другие вопросы, связанные с продукцией Huawei. Для России звонок бесплатный.
Какие приложения доступны в AppGallery Huawei?
Нужно подчеркнуть, что ресурсы магазина Huawei систематически растут. Дизайн магазина радует глаз и передвижение по нему не вызовет никаких проблем. Приложения отсортированы по нескольким категориям, после выбора мы получим набор наиболее важной информации и кнопку для загрузки.
Некоторые приложений, которые можно ожидать в AppGallery: Aliexpress, BlaBlaCar, MS Word, MS Excel, MS PoerPoint, MS OneDrive, VLC, Viber Messenger, TikTok, Snapchat, Canva. Конечно же это не все.
Авторские приложения Huawei
HMS — это экосистема, которая также состоит из нескольких оригинальных решений этого производителя. Они представлены как прямая альтернатива решениям Google.
- AppGallery – аналог Google Play;
- Huawei ID — аккаунт пользователя смартфона, аналог аккаунту Google;
- Облако Huawei — 5 ГБ свободного пространства для хранения данных;
- Браузер — стандартный веб-браузер на новых смартфонах Huawei приятно удивит функциональностью;
- Huawei Pay — бесконтактные платежи;
- Huawei Assistant — голосовой помощник, альтернатива Google Assistant;
- Huawei Music, Huawei Video и Huawei Reader — приложения по умолчанию для мультимедиа и текстовых файлов.
Most applications use Google Play Service for fast and easy application development, including Firebase, a server-side service for Login or Database related capabilities.
Wongnai application also uses various Google Play Service APIs, such as
During the end of last year, Huawei launched Huawei Mate 30 and Mate 30 Pro without Google Mobile Service (GMS) pre-installed. Making them unable to use Google Play Service and Firebase. Huawei has pre-installed Huawei Mobile Service (HMS), which is as capable as Google Mobile Service.
จำนวน active devices ของผู้ใช้ Wongnai
HMS Toolkit
It is not difficult to integrate applications with HMS. HMS capability covers almost all of the key features, and the included APIs are almost identical to that in GMS. There are multiple integration methods. A typical method is to add HMS to the project and check whether to use GMS or HMS.
After the plugin finishes its job, a class that bridge between GMS and HMS will be generated. Developers can simply switch to use the generated class.
However, not every SDK can be auto-converted to HMS (such as Firebase). The plugin will show APIs that developers need to convert manually.
The advantage of this method is the easiness. Simply run the plugin and wait. Then, just make slight code change (Depending on the project size and the SDK being used). Now, the application is ready. This method supports both Huawei and non-Huawei smartphones.
The disadvantage of this method is larger in the application file size due to the addition of HMS’s dependencies. Besides, the plugin might encounter a problem with large projects, such as Wongnai Application. Which upon launch, the plugin will freeze and cannot complete the task.
1 Application, 2 Systems
Another possible method is to use Product Flavor to separate GMS code from HMS code. This method requires apps to be built separately.
When adding dependencies, add a variant name in the front, such as dependencies of variant google, add googleImplementation instead of implementation
googleImplementation «com.google.android.gms:play-services-location:16.0.0″huaweiImplementation «com.huawei.hms:location:4.0.0.300»
Then simply copy the files that use GMS to google folder and huawei folder, then modify the files in huawei folder to use HMS instead of GMS
— app — src — google — java/com/example/android/LocationPickerActivity.kt — huawei — java/com/example/android/LocationPickerActivity.kt
After that, when building apk, select preferred Build Variants.
This will prevent app size from increasing, as we separate it into 2 apps. Google’s build variant wouldn’t have HMS’s dependencies, and the Huawei’s build variant wouldn’t have GMS’s dependencies. But the disadvantage is the code base will be separated into 2 variants, making it difficult to maintain.
Bridge
The team is not quite satisfied with the first 2 methods. Another method that would not increase the app size and allow easy codebase maintenance is needed.
This is similar to the above 2 methods. Instead of separating app’s class into 2 files, we would separate SDK files instead. By creating the class that bridges the class of GMS and HMS, then separate the bridged class by build variant.
— app — src — google — java/com/example/android/map/model/LatLngBounds.kt — huawei — java/com/example/android/map/model/LatLngBounds.kt
Since HMS APIs are almost identical to the GMS, we are able to copy GMS’s class and methods names over almost without having to make any modifications.
For example, LatLngBounds’ class, which belongs to Google Map. We could create LatLngBounds’ class in google folder, then inject GMS instance via the constructor, and set the properties/methods to be the same as that of GMS by calling the instance of GMS in properties/methods. For HMS’s class, simply create identical files in huawei folder. But inject HMS’s LatLngBounds through constructor instead.
ตัวอย่าง class ที่ใช้ bridge LatLngBounds ของ Google Map
Once all files are completed, Change the file’s import of the class that uses GMS to uses the classes we’ve just made instead. Then all is settled.
This method has the same advantage as the second method in that no HMS’s dependencies need to be added. And the running code does not need many modifications. The codes that require additional maintenance are consist of the classes that bridge between SDK only. The disadvantage is you need to create a bridge for every class and methods of the SDK you want to use. And if there are API mismatch between GMS and HMS, an additional check is needed.
Conclusions
All 3 methods contain both advantages and disadvantages. Some method suits better with some project. For small projects requiring few services, HMS could be directly integrated. For large projects that concern about APK sizes and ease of maintenance, the method that separates product flavour is better.
However, the above methods are only for temporary use to release the applications quickly. The better way is to abstract the SDK class to a separate layer. So that our apps would not be bound to a specific SDK.
For a long time, I wanted to gather the questions from many channels under a title. In cases where there are constantly and repeatedly asked questions, I aim to be a resource.
In this article, I will explain how you can integrate Huawei Mobile Services. Integrating Huawei Mobile Services (HMS) is a prerequisite for using all the kits Huawei is offering in your application.
Create an App in AppGallery Connect
1.1 — Sign In/Register to Huawei Developer website and click to Console
1.2 — Click to the AppGallery Connect button in order to access AppGallery connect.
1.3.1 — Click My projects button to create new project or add new app to existing your projects.
1.3.1.1 Create new project
1.3.1.2 Click Add App button to add new application to your project.
1.3.2 Or click My apps button to create/modify/view all of your applications
1.3.2.1 Click on New app button to create new application.
Creating new app
1.4 -Adding a new app
Enter name, category and default language for your application, then click create button to finish app creation.
New app settings
1.5 — If the app creation is successful the page will navigate you to the App Information page. On this page, you can find your APP ID and APP SECRET of your application.
Add Package Name
2.1- After completing the steps above you should go to the Develop tab on the page. If you are opening Develop tab first time, it will ask you to enter your package name. You have two options here. You can either write your package name manually (Package name must be same with your project) or you can upload your apk and the system will fetch the package name automatically. For this tutorial we are going to use manual section.
Creating a Signing Certificate (Keystore)
Android requires that all apps be digitally signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app. So you need to generate your certificate after completing the steps above.
Generating SHA-256 Fingerpring from Signing Certificate (Keystore)
After completing the steps above, you should extract SHA-256 fingerprint with using keytool provided by JDK.
Add SHA-256 Fingerprint to the AppGallery Connect
After generating your SHA-256 fingerprint, you need to add your fingerpring to the AppGallery Connect by navigating to the bottom of Develop tab in AppGallery Connect and you will find “App Information” section. At the end of this section you will find a field named “SHA-256 certificate fingerprint:” and you should add your fingerprint there.
SHA-256 fingerprint setting
Add HUAWEI Maven Repository and AGCP Plugin to Project
6.1- Add HUAWEI agcp plugin and HUAWEI Maven repository to the project-level(root-level) build.gradle file
Project level build.gradle.file
Project Level Gradle File
6.2- To your module (app-level) build.gradle file (usually app/build.gradle), add the HUAWEI agconnect plugin.
App level build.gradle file
Configure Project Signature
7.1- Copy the generated signature file test.jks into the app folder and open your module (app-level) build.gradle file (usually app/build.gradle).
Signature .jks file
7.2- Add the signature configuration to the app-level build.gradle file
App Level Gradle File
7.3- Synchronize your project
If the synchronization successfully completed, everything is ready and now you can use awesome kits Huawei is offering.
Add AppGallery Connect Json to Your Project
After finishing all the steps above, “agconnect-services.json” file needs to be downloaded from developer.huawei.com and this downloaded json file needs to be moved to the under “app” folder of your project.
Download agconnect-services.json file
Adding agconnect-services.json to your project
If you are reading this line and completed the steps above, congratulations you have successfully implemented HMS Core to your project.
Related Documentation
Codelab for HMS Integration
So, I managed to do it like this:
Defined two flavours
I use the «g» and «h» in the code whenever I need to decide on doing things like: the API requires a deviceType of «android» or «iOS» and with the inclusion of the Huawei build we defined another constant «huawei». I use SERVICE_USED to know what constant to send.
I then did this at the top of the build.gradle:
to only include the proper plugin.
I then started handling each thing that was using gms (maps, location, push notifications, analytics ) by making a wrapper and separating the code in each flavour. i.e. for push notifications i created a HPushNotif which has an getToken method. I define the same class and method in both flavours but I implement them according to the type of service (gms or hms).
I used this type of notation when including dependencies in the project:
//GMS stuff
gmsImplementation ‘com.crashlytics.sdk.android:crashlytics:2.10.1’
gmsImplementation ‘com.google.firebase:firebase-core:16.0.9’
gmsImplementation ‘com.google.firebase:firebase-messaging:18.0.0’
gmsImplementation ‘com.google.firebase:firebase-crash:16.2.1’
gmsImplementation ‘com.google.android.gms:play-services-maps:16.1.0’
gmsImplementation ‘com.google.android.gms:play-services-location:16.0.0’
gmsImplementation ‘com.google.android.gms:play-services-tagmanager:16.0.8’
//HMS stuff
hmsImplementation ‘com.huawei.agconnect:agconnect-core:1.0.0.300’
hmsImplementation ‘com.huawei.hms:push:4.0.3.301’
hmsImplementation ‘com.huawei.hms:maps:4.0.1.301’
hmsImplementation ‘com.huawei.hms:location:4.0.3.303’
The gms and hms before the Implementation refer to the name of the flavours. Those dependencies will only be loaded when the appropriate BuildVariant is selected (i.e. appropriate flavour is being built).
Basically I wrapped the logic for maps, analytics, location and push notifications for both cases. This is how the structure looks. Nothing special.
That’s it. When they created HMS they basically copied GMS class by class and methd by method. You’ll see that the exact method names match exactly, to the calling parameters even and returning values. They’re 99.99% the same. That makes things easier. Basically you just need to copy the code in two classes and import the proper things (at the top of the class). You rarely need to change the code you’ve already written for GMS.
Hope it helps someone.

Your app contains content that doesn’t comply with the Device and
Network Abuse policy. We found your app is using a non-compliant
version of Huawei Mobile Services SDK which contains code to download
or install applications from unknown sources outside of Google Play.
I am using Huawei Mobile Services SDK for Auto Eraser.
List of used dependency
Added below meta data in manifest.xml
asked Mar 17, 2022 at 7:37
6 gold badges33 silver badges48 bronze badges
Note:
If you have confirmed that the latest SDK version is used, before submitting a release to Google, please check the apks in all Testing track on Google Play Console(including Open testing, Closed testing, Internal testing). Ensure that the APKs on all tracks(including paused track) have updated to the latest HMS Core SDK.
Required versions for cross-platform app development:
answered Jun 2, 2022 at 10:06

15 gold badges76 silver badges106 bronze badges
If you have dependencies that can be replaced with Google compatible equivalent dependencies then this could be a possible solution to manage both in one code base.
Using app flavours I was able to separate my GMS and HMS dependencies. In your app level build.gradle file you can create product flavour like so
More on product flavors here.
And then you can specify if a dependency should be part of the flavour by prefixing it to the keyword implementation under dependencies.
I then went a bit further by wrapping the usage of each dependency in a class that is available in both flavours but the implementation differs based on the dependency’s requirements.
So I am free to use the wrapper class anywhere without worrying about the dependency mismatch.
The HMS dependency is no longer part of the GMS build variant so I would be able to upload that to the Google playstore.
answered Mar 23, 2022 at 13:56
8 silver badges20 bronze badges
huaweiImplementation «com.huawei.hms:iap:3.0.3.300»
huaweiImplementation «com.huawei.hms:game:3.0.3.300»
huaweiImplementation «com.huawei.hms:hwid:5.0.1.301»
huaweiImplementation «com.huawei.hms:push:5.0.0.300»
huaweiImplementation «com.huawei.hms:hianalytics:5.0.3.300»
huaweiImplementation «com.huawei.hms:location:5.0.0.301»
For that I create dummy classes with the same packages tree as Huawei, for instance:
Now if you change the build variant to dev, you should have access to the dummy classes in your app. If you change it to huawei, you should be able to access the classes from Huawei dependencies.
answered Mar 25, 2022 at 9:40

2 gold badges25 silver badges45 bronze badges
Huawei released a new version of their SDK : 3.4.0.300
3.4.0.300 (2022-03-04)
New Features
- Modified the SDK privacy and security statement. Updated the SDK
- versions of all subservices.
For me, since I’ve migrated to Google ML Kit, I will wait till August, then I will switch back to Huawei ML Kit to make sure Google will not remove or suspend my apps.
Old answer :
I used to love the HMS ML kit, but because of this issue, I’m aware that Google will one day completely suspend my apps because I’m using HMS services, and even if Huawei fixes the issue, we’ll have to wait 120 days to find out if we’re safe.
In my case, I’m using the HMS Segmentation ML Kit. I’ve just switched to Google Selfie Segmentation ML. I will wait till 120 days have passed and see if the issue is still persisting for other developers. If not, I will switch back to the HMS Kit.
answered Mar 18, 2022 at 10:44
I just use hms push when upload to huawei.
i fixed by commenting hms services in build.gradle and app/build.gradle when to upload to playstore.
Then, I uncomment if upload to huawei.
//apply plugin: «com.huawei.agconnect»
apply plugin: ‘com.google.gms.google-services’
//implementation ‘com.huawei.hms:push:5.3.0.304’.
22 gold badges22 silver badges41 bronze badges
answered Mar 23, 2022 at 2:33
