Huawei, the Trade Ban, and Developers

Last week, the US government enacted some level of a trade ban affecting Huawei. The exact ramifications are still being deciphered, but Reuters is reporting that Google has elected to no longer ship the Play Store and the commercial Google apps (Gmail, YouTube, etc.) to Huawei for future devices. The Verge and Bloomberg offer their own confirmation of this, with elaborations that Intel, Qualcomm, and other chipset manufacturers are also discontinuing sales to Huawei. Google’s tweet, with its emphasis on “existing” devices, lends credence to this reporting. And XDA Developers points to a statement from Huawei further suggesting that Google’s ban is in place.

Assuming that all of this is indeed what is going on, here are some thoughts on this situation, with an eye towards how it affects you as a developer.

Right now, it appears that there will be no immediate effect on existing Huawei devices and users. All phrasing suggests that the Play Store and related Google proprietary tech will continue to be supported on Huawei’s past and current devices. Google’s decision will impact future devices the most. It also means that current devices may wind up not getting upgrades to Android Q or beyond… but developers are used to devices not getting Android OS upgrades. So, for developers currently serving Huawei users, nothing should change in the immediate term.

The net effect would be that all Huawei devices would work like those that Huawei distributes within China. Google does not license their suite for such devices. Huawei has lots of experience in distributing devices outside of the Google Play ecosystem, and so from a technical standpoint, this will be a significant headache but should not be a show-stopper for Huawei.

The biggest Huawei software challenge is in figuring out how users will get their apps. There are countless app stores in China, including Huawei’s own, filling the gap that the Play Store left. Huawei may be able to use their own app store or tap on existing partners that have relationships with major Western app brands to keep “big name” apps available on Play Store-less Huawei devices. As Ron Amadeo notes, the Amazon AppStore for Android likely is not an option, even if Huawei wanted it, as Amazon is a US company.

If Huawei does go this route and distributes non-Google Play devices outside of China, developers should pay attention to what app store(s) are included on those devices. They may be an interesting distribution channel for your apps, supplementing the Play Store, as Huawei is a major brand in many markets. With luck, those app stores will try to make it easier for developers who have Play Store listings to cross-list in these other stores.

This helps illustrate the problems that arise when developers focus exclusively on the Play Store. While this is the first loss that the Play Store has suffered since Google left China, it might not be the last, given the renewed interest in antitrust/anti-competitive behaviors in recent years. Off and on for the past decade, I have been all but begging developers to diversify their distribution options, so that a problem with one channel (e.g., a Play Store ban) does not derail their entire business. Perhaps Huawei will wind up helping to establish a clear alternative to the Play Store, or at least highlighting the opportunities for developers with other distribution channels.

This also helps to illustrate why I try to avoid relying upon the Play Services Framework. Apps that are inextricably tied to Play Services can only be distributed through the Play Store. That may make sense tactically but IMHO is a dreadful strategic decision for developers. If you use Play Services, have two product flavors: the Play Services one and other . Make sure that the other flavor can “gracefully degrade” your app experience if Play Services becomes unavailable to you, for some of your users, for whatever reason.

And, of course, this also points out the problems with app bundles, Google’s app signing service, instant apps, and anything else that locks you into the Play Store. If your app can conditionally use those things but can survive without them, great! If your app cannot function without the Play Store… again, IMHO, that was not a wise strategic choice.

In terms of the OS itself, from a practical standpoint, this trade ban cannot block Huawei from working with Android via the Android Open Source Project (AOSP). Even if the US government tried to declare that Huawei cannot work with US-developed open source software, there is no good way to stop it. Also, as with the previous ZTE ban, it is quite possible that the ban will be lifted in the not-too-distant future, as a settlement in the ongoing trade negotiations between the US and China.

However, from a strategic standpoint, this has the potential to push Huawei into a long-term “anything but Android” approach, to go along with their past work to help isolate themselves from dependence on US chips. Samsung has long been trying to diversify its OS portfolio, with Tizen being the result. Huawei itself has toyed with building another OS. I can see Samsung, Huawei, and perhaps others (HMD?) forming a consortium to work on some next-generation mobile OS. Samsung and Huawei alone make up a third of the smartphone market, so if they “teamed up”, whatever OS they support would be very interesting.

Should Huawei — with or without other manufacturers — start pushing a new mobile OS, the key will be getting apps for it. Users expect to be able to install all sorts of different apps. Huawei may be able to convince developers that they have the device distribution numbers to make it worthwhile. However, it still has to be relatively easy to do. That could be through some sort of Android compatibility layer, as BlackBerry tried. That could be through some sort of Android runtime, akin to how Chrome OS works. That could be through focusing on getting existing cross-platform toolkits (Flutter, React Native, etc.) to support their new OS. That could be through ensuring that a Kotlin Multiplatform approach would be a reasonable to support both Android and the new OS. It could be through some combination of these, or other similar solutions. But it has to exist — telling developers that they have to start over from scratch will make it a tough sell outside of China.

TL;DR: In the short term, you may want to use Huawei as a reason to make your Android app a bit less Google-dependent in terms of tech (Play Services) and distribution (Play Store). And in the medium term, consider what steps you might want to take to make it easier to support some new OS – whether it is from Huawei, Google (Fuchsia), or whoever – when an opportunity arises.

Interested in Jetpack Compose? jetc.dev has a weekly newsletter of the latest articles, samples, and other details of Compose development!

— May 20, 2019