HMS Core on Android is Huawei’s alternative to Google Play Services
The Huawei Mate 30 Pro is objectively one of the best hardware releases of this year, featuring practically every meaningful innovation in the phone world so far, and introducing a fair few of its own. However, despite offering one of the best sets of features available on an Android smartphone, it cannot be recommended to a large swathe of users. And the blame for such an exclusion lies solely on the political situation between Huawei and the USA, which has forced the company to release an otherwise-excellent piece of hardware without the most crucial bit of functional Android: Google Play Services. The world could do nothing but watch as an Android giant attempted to figure out its way in a Google-less world. Huawei needed functional and reliable alternatives for itself and its users, and it needed them yesterday.
Thankfully, Huawei had the foresight to work on some of its own solutions long before the unfolding of any trade politics. The Huawei AppGallery offered end-users and app developers an alternative to the Google Play Store, functioning as a medium to distribute and maintain Android apps. But distributing apps solves only part of the equation. The other major factor that also needed to be addressed is the fact that a lot of Android apps, including Google Apps, rely on a closed set of APIs to function — APIs that separated AOSP’s Android from Google’s Android, coming in the form of Google Mobile Services and Google Play Services. While Huawei could still continue using Android because of the open-sourced nature of AOSP, it couldn’t use the proprietary Google Mobile Services (GMS), and by extension, Google Play Services on the Huawei Mate 30 Pro. This meant that developers who exclusively relied on GMS for functionality within their apps lost access to the tools that made those functions possible on future Huawei devices. For affected users, this meant that several of their apps would remain broken until the trade situation was resolved, or the app developers explored alternatives, or the user explored alternative apps. Two of those three situations are to the detriment of the app developer, and exploring an alternative to reduce the over-reliance on GMS might be in the better business interest of the developer.
In this article, we will be exploring the second arm of Huawei’s alternative solutions. Meet Huawei’s HMS Core, the alternative to Google Play Services on Android.
Google Mobile Services, GMS Core and Google Play Services
Before we attempt to answer what Huawei’s alternative does, we need to take a step back and look at what Google’s solution did for Android.
While Android can be classified as an “open source” OS thanks to the existence of AOSP (Android Open Source Project), most users around the world have never really experienced AOSP in its purest sense. Most smartphones sold across the world, except in certain regions like China, come with Google’s Android, which is AOSP plus Google Mobile Services.
Google Mobile Services consists of regular user-facing apps such as the Google app, Play Store, Chrome, Maps, YouTube, Gmail, Photos and more; as well as APKs for core background services such as GoogleOneTimeInitializer, SetupWizard, GooglePackageInstaller, and of course, the GMSCore, and more. GMS Core is what we commonly refer to as Google Play Services.
Google Play Services evolved as a means to solve some of the severe fragmentation issues that Google had been facing in the early days of Android. While Google was punctual with delivering Android updates with new functionalities that app developers could leverage in their own apps, the same functions would not be available across the whole Android universe for quite a few years because of the lack of updates from OEMs. Google responded by shifting key API solutions over to the Play Services platform, over which it had much greater control and which could be updated independently of the Android OS.
This allowed app developers to build experiences that would function in the same manner across different Android versions. The migration did help with Android’s fragmentation woes, but it also has led to a monopolistic universe where the exclusion of Google Play Services could handicap the entire experience of an Android smartphone.
GMS is only available through a license with Google and delivers a holistic set of popular apps and cloud-based services.
GMS, and by inclusion Google Play Services, is only available to smartphone OEMs through a license with Google, which OEMs need to apply for once they pass the Android Compatibility Test Suite (CTS) and Google Test Suite (GTS) on a per-device basis. Since the inclusion of GMS and GMS Core is behind a license, and practically all major apps have grown to be reliant on Play Services and its APIs for many of their core functions, Google retains complete control of the Android ecosystem despite Android being open-sourced as an OS. It is likely that, as an Android user, you cannot practically use Android without Google, given that you would lose out on the following APIs:
- Google Sign-in: Hate having to create a new account for every new service you’re interested in? If the service supports Google Sign-in, then you can quickly sign-up using your Google Account.
- Fused Location Provider: Rather than having a bunch of different apps running in the background at different times to poll the location, Google Play Services can provide the location data in a relatively battery-efficient way.
- Maps: Google Maps is by far the most popular maps and navigation apps for users. With the Maps SDK, developers can use Google Maps data in their own apps. It isn’t free to use, which is why a lot of smaller indie apps won’t use this SDK, but you’ll see it in a lot of apps from bigger businesses.
- Google Play Games: A lot of games, especially those from indie game developers, rely on Google Play Games Services. For example, it’s possible (but not for much longer) to build an entirely free real-time or turn-based multiplayer game using Play Games Services.
- Firebase Cloud Messaging: Do you like getting instant notifications from your apps? Wouldn’t it be annoying if a bunch of different apps had their own push notification servers all sending you notifications independently, constantly waking your phone and draining its battery? That’s the reason behind Firebase Cloud Messaging—just let Google Play Services handle push notifications! There’s no benefit in implementing an alternative because recent Android versions ensure they won’t stay alive in the background.
- Google Play In-App Billing: Google requires that all apps and games with in-app purchases (IAP) that are distributed through the Google Play Store use this API and only this API to handle IAP, mandating a 30% cut to Google for all transactions.
- AdMob: A lot of free apps use advertisements to generate some revenue when users view or interact with them. Who better to turn to for advertisements than Google? There are certainly alternative advertising platforms—and developers are encouraged to diversify their advertising sources—but few feel compelled to use them.
- Google Cast: Own a Google Chromecast, Google Home smart speaker, Google Nest Hub, or any other smart device that supports the Google Assistant ecosystem? In order to cast video or audio to supported devices, apps use the Google Cast SDK provided by Google Play Services.
- SafetyNet: SafetyNet is most known for its Attestation API which banking apps and online games use to detect if a device has been tampered with.
This overarching control has largely been ignored by most of us. Most OEMs have played well with Google’s decisions made through the GMS Core, though we do not know if this cooperation was out of their free will or because they had no real choice. When news surfaced of Huawei’s political situation, the focus shifted back again to how central Google Play Services is to the Android experience, and how Huawei would make up for the deficit.
Huawei Mobile Services and HMS Core
Huawei Mobile Services, or HMS, is Huawei’s alternative to GMS, consisting of user-facing apps as well as core background services. The idea behind HMS is the same as that of GMS — to provide an experience that is consistent across devices and independent of the platform update. Much like how GMS is made up of app elements and core elements, the HMS ecosystem comprises of HMS Apps, the HMS Core, and the HMS Capabilities that the Core enables through its available APIs.
HMS Ecosystem has seen its monthly average users increase from 420 Million globally in July 2018 to a huge 530 Million by July 2019, while developers registered on this platform grew from 450,000 to 910,000 in the same time period, and HMS Core app integration grew from 20,000 apps to 43,000 apps. Google does not release figures for its GMS integrations, so getting scale here is difficult against the #1 player, but these are still impressive figures in absolute terms. According to additional figures revealed by Huawei, HMS Core has a global reach of 530 Million users in more than 170 countries (including China), while still providing features such as cost-effectiveness, a unified portal for one-stop integration, and precise user targeting through multiple promotion channels. Huawei also claims to be compliant with international security and privacy standards, including GAPP, GDPR, and local regulations within its ambit.
All of this will merely remain marketing points if HMS Core does not incorporate the APIs that GMS Core provides. In order to be a replacement for GMS Core, HMS Core needs to provide similar, if not better, functionality to developers, if it wishes to persuade them to consider itself as a valid option and migrate over from using GMS Core. HMS Ecosystem is currently limited only to Huawei devices, but even on its own, this is a massive subset of Android devices. Huawei alone has shipped over 200 Million smartphones this year so far, which is a substantially large number for app developers to take notice. As an app developer, it becomes essential to adapt to these devices as well as other Huawei devices that may not ship with GMS in the future. Even if GMS makes a return to Huawei, HMS continues to be part of Huawei’s larger ecosystem strategy, where the smartphone becomes the central focal point that is used to control connected IoT devices. So adapting your app to play well with the HMS Ecosystem does make a compelling business argument. You don’t want to make the same mistakes that Snapchat did when it ignored its Android userbase for years and only woke up to pay attention to them very recently.
To offer more detail on the APIs that HMS Core provides to developers, here is a brief overview:
HMS Core’s Account Kit is the answer to Play Service’s Google Sign-In, allowing developers to use an existing Huawei account as a valid option for signing into their app. This alleviates user fatigue by not requiring them to create a new account just for that app, and skip steps like email address verification, mobile number verification, and inputting other credentials; and overall helping the developer with the user onboarding process and lowering the user churn rate during registration and login.
Account Kit boasts of the following features:
- Secure login
- One-click authorization
- Integration with different use cases: smartphones, tablets, large displays, in-vehicle infotainment
- Support for Two-Factor authentication
- Data encryption in the entire process
- Compliant with GDPR specifications for user privacy
- Global coverage within the HMS ecosystem and with support for 79 languages
HMS Core’s Location Kit is the answer to Play Service’s Fused Location Provider, essentially providing developers with access to accurate location data for use within apps. Much like Fused Location Provider, Location Kit adopts a hybrid positioning mode using data from GPS plus WiFi plus Bluetooth plus Network Base Station. This allows it to provide an easy-to-use, precise positioning interface for app developers, letting them quickly and accurately obtain user location information.
Location Kit boasts of the following features:
- High location success rate: Huawei claims that the offline + online location success rate reaches 99%
- Fast positioning
- High positioning accuracy: The hybrid positioning mode allows for high accuracy
- Low power consumption
Location Kit also has more features in the pipeline:
- Low-power geo-fencing
- Location semantics
- Integrated IP positioning
- High-precision indoor positioning
- Location awareness
HMS Core’s Map Kit aims to be equivalent to Google’s Maps SDK, providing developers with convenient and powerful map capabilities that can help improve the map experience within apps.
Map Kit provides developers access to a personalized map display with rich map elements and multiple interaction modes. Map Kit also comes with its own geolocation data, with a claimed 100 Million+ information on points of interest, 150 Million+ information on addresses, as well as input prompts for sites and its own geocoding API. Map Kit covers 150+ countries and 40+ languages, and provides access to 25 APIs in total.
HMS Core’s Drive Kit aims to enable the functionalities that Google can enable through the Google Drive REST API within an Android app.
With Drive Kit, developers can create applications that can read, write, and synchronize files with Huawei Cloud.
Some of its key features include:
- Easy to use and save files
- Real-time file update
- Multi-device support
Drive Kit is also planning to introduce more functionality in the future, such as file sharing, team collaboration, and intelligent search.
To the best of our understanding, Drive Kit is different from Android’s Auto Backup for Apps API, in that it does not support backing up the settings of an app to the cloud yet. Huawei mentions that the feature is coming by December 2019, which should substantially improve the utility of this API.
HMS Core’s Game Service aims to be the equivalent of Google Play Games. Game Services provides an easy way for players to sign-in and track achievements and related ranking. In addition to this, game developers can also utilize the APIs related to gift packages, rewarding users with in-game rewards upon completing achievements.
Other APIs planned for the future for Game Service include tracking player data and statistics such as game duration, login time, frequency, activity ranking, payment limit ranking, and purchase quantity; and game event reporting.
HMS Core’s Push Kit is the equivalent of Google’s Firebase Cloud Messaging, essentially allowing app developers to send messages from the cloud to your users. Push Kit establishes itself as a reliable, real-time push message platform with global coverage, spreading over 200+ countries. App developers can take advantage of the precise targeting features it offers to promote the usability of the app to the users and promote interactions and transactions with the app by increasing the app’s page views and unique visitors.
HMS Core’s Analytics Kit is equivalent to Google’s Firebase Analytics. The basic goal of the Analytics Kit is to provide app developers with an easy way to measure different metrics within the app and provide analysis on the basis of those metrics. With Analytics Kit, Huawei claims that developers will be able to collect as many as 500 types of behavior data, presenting a very wide potential for gaining insight into the user, their interactions and habits within the app. Consequently, the app developers can then formulate optimization policies as needed, in order to drive engagement and user retention within the app.
Analytics Kit claims to provide:
- Simple and efficient access, with predefined events, customized events, and online debugging
- Secure data service with anonymous user identities, encrypted transmission, and multi-tenant isolation
- Customizable dashboard with rich analysis features such as:
- Funnel conversion and retention analysis: Identify the characteristics of event churn to formulate targeted user operation policies
- Event analysis
- Audience analysis
- Real-time analysis: Analyze currently hot events in real-time and adjust operation policies
- Online debugging, with quick second-level response
HMS Core’s In-App Purchases is the equivalent of Google Play In-App Billing, and perhaps the most important of all APIs as far as app developers are concerned. Without a robust monetization medium in place, there will be little incentive for a developer to actually dive into the HMS ecosystem. With In-App Purchases, developers should be able to realize monetization globally. HMS’s In-App Purchases covers five broad APIs in two categories: Product Management Service, Subscription Service, Order Service, Sandbox Test Service, and Merchant Management Service.
Subscription service, as the name implies, is to monetize users who are tied loyally to the service and can be considered as a more stable form of revenue. This part of In-App Purchases boasts of the following features:
- Supports customized free trial use and preferential promotion
- Supports global automatic pricing
- Supports adjusting subscription price on a per-country basis
- All-round notification management
- Subscription reports
Order service is for the single-transaction non-recurring form of purchases, and it boasts of the following features:
- Simplify the payment access process
- Manage payment orders for developers
- Simple access and interaction logic
HMS Core’s Ads Kit is the equivalent to Google AdMob, and forms the second leg of monetization for the Huawei Mobile Services ecosystem. Ads Kit provides unique device-level ad identifies and advertisement-conversion tracking capabilities to build an advertisement ecosystem.
As part of the changes introduced in Android 10, apps must have privileged permission to request the phone’s IMEI, which essentially clamps down on the use of this non-resettable identifier for marketing and advertising purposes. Huawei’s Ads Kit thus relies on an OAID (Open Advertising ID) solution as a non-permanent advertisement identifier, allowing developers to balance user privacy while still providing personalized advertisements and accurately tracking advertisement effects.
Every HMS device has a unique OAID which is generated immediately after the device is started for the first time. Users also retain the option to reset the OAID as well as opt-out of personalized advertisements. OAID thus converges digital identity with privacy by removing the connection between the device identifier and the user information.
Huawei’s HMS Core is a doughty attempt by Huawei, one that shows their perseverance in retaining their competitive edge in the smartphone hardware and software ecosystem. Most other Android OEMs would have collapsed without Google’s support, as none (perhaps with the exception of Samsung) are in any position to offer such a robust set of alternative APIs that could realistically provide a similar set of functionalities to developers and users.
HMS Core turned out to be Huawei’s secret weapon, one that was hidden in plain sight, being brought to the foreground when the company really needed to adapt. With the company’s political situation remaining unresolved for far too long, HMS Core remains the solution that developers need to turn to if they intend to retain their Huawei audience. Huawei hasn’t quit the smartphone market after the trade ban — far from it actually, as the company registered 63% YoY growth in the Chinese market and a 29% growth in the global market, despite the trade ban. The company still intends to move ahead and the consumers will find it hard to resist excellent hardware like the Huawei Mate 30 Pro.
With Huawei’s current momentum, alternative software solutions are bound to come up thanks to the law of demand and supply. So the only question to you as an app developer remains: do you have the foresight to adapt, too?
Written with inputs from Mishaal Rahman