• Huawei Developer Account.

  • Huawei mobile app.

  • PushBots account.

  • Android studio 2.3+

  • [optional] Huawei 2020 model or newer to test with.

Step 1: Get HMS credentials:

1. Open AppGallery connect dashboard.

2. Create new Project:

And enter project name:

Click on Add app, Enter package then fill details and click ok:

Copy appId, and clientId to be used inside the applicaiton:

Generate SHA-256 key and add it in app settings:

  • From Android Studio open View > Tool Windows > Gradle

  • select app > Tasks > android > signingReport

  • Copy your SHA-256 for your release variant.

Step 2: Enable Push kit:

Click on Push kit then click on Enable now

Step 4: Add Huawei Gradle Plugin and Dependencies

build.gradle (project)

allprojects { repositories { maven { url '' } } }

Step 5: Import the PushBots library into your project:

Follow instructions in this link:

Open build.gradle (Module: app) file:

1. Comment firebases-messaging dependency:

//implementation ''

2. Add HMS push kit dependency, and make sure you're using pushbots-lib 3.3.5-beta2+ for HMS support:

implementation 'com.pushbots:pushbots-lib:3.3.5-beta2@aar'
implementation 'com.huawei.hms:push:'

3. Replace senderid with HMS clientId:

new Pushbots.Builder(this)

4. Add HMS appid in manifest file inside <application tag:

android:value="appid=HMS-APPID" />

Compile the application to release in appgallaery.

Did this answer your question?