androidhuawei-mobile-serviceshuawei-developersappgalleryharmonyos

What google services are banned in Harmony OS (here is a list that I have used in my android app.)


I need to upload my android apk file in harmony os and as google services are banned in this platform, I would have to use the alternative platform. Here is a list of google services that I have used. Please help me to distinguish what google services would I need to override and recode for Harmony OS.

com.google.android.material
com.google.firebase
com.google.android.gms:play-services-auth
com.google.android.gms:play-services-maps
com.google.android.gms:play-services-location
com.google.android.libraries.places
com.google.code.gson
com.google.protobuf.nano:protobuf-javanano

Solution

    1. Your app has integrated GMS. As new Huawei phones are banned from using GMS, you app, if with GMS integrated, will be unable to run on new Huawei phones. If you want your app to run on these phones, integrate Huawei Mobile Services (HMS).

    If you want to use the map service in your app, and also want your app to run on both Huawei phones and Google Android phones, you can integrate both GMS Map Kit and HMS Map Kit. Then your app will use HMS Map Kit on Huawei phones, while using GMS Map Kit on Google Android phones.

    In the list you provided, you use these GMS services:

    com.google.firebase
    com.google.android.gms:play-services-auth
    com.google.android.gms:play-services-maps
    com.google.android.gms:play-services-location
    com.google.android.libraries.places
    

    You can refer to the following Huawei mobile services:

    Account Kit, Map Kit, Location Kit, Site Kit, AppGallery Connect auth service

    1. You can use this IDE plug-in called HMS Core Toolkit to help you analyze where GMS is used in your code. HMS Core Toolkit supports analysis of manual conversion, aiming to increase the conversion efficiency. It provides two conversion policies: Add HMS API and To HMS API. You can choose one as required.

    The Convertor is a code conversion tool supporting Java and Kotlin projects. This tool can help you quickly convert the existing Android app code for calling third-party APIs into the app code integrated with the HMS Core.

    New Conversion can automatically convert the GMS APIs called by apps into HMS APIs, using either the To HMS API or Add HMS API conversion policy.

    1. Upload your app through AppGallery Connect.
    1. Register and create your app: Register and sign in to your HUAWEI Developer account, go to AppGallery Connect, create a new app, and upload the APK.
    2. Set basic information: Set languages and basic app information, such as app name, introduction, screenshots, and app category.
    3. Set release information: Select your business model (free or premium), release countries and regions, and a link to the privacy statement.
    4. Submit for release: Confirm that all of the information provided is correct, and submit your app for review.