Huawei Integration

1. Integrate Pushwoosh Android SDK

To integrate the SDK, follow the guide.
Skip the steps 2-6 if your app is distributed via Huawei AppGallery only. If you're distributing the app via Google Play as well, configure Android following the guide.

2. Configure Huawei

2.1. Go to AppGallery Connect -> Projects List and select a project to configure.
2.2. Press agconnect-services.json in the App information section to download a configuration file.
2.3. Put the downloaded file into your Android Studio project (YOUR_PROJECT/app/agconnect-services.json).

3. Generate Signing Certificate Fingerprint

3.1. In Android Studio, go to View > Tool Windows > Gradle.
3.2. In the window opened, go to app > Tasks > android > signingReport.
3.3. Copy SHA-256 from your release keystore.
You can also add the SHA-256 from your debug keystore for testing purposes.
3.4. Select your project in AppGallery Connect Project List.
3.5. Paste the SHA-256 into the SHA-256 certificate fingerprint field.
Please be aware that fingerprint processing may take up to 10 minutes.

4. Add the pushwoosh-huawei module

Add the pushwoosh-huawei module to your app-level build.gradle:
implementation 'com.pushwoosh:pushwoosh-huawei:6.+'
Replace "+" with the current version of Pushwoosh:

5. Add Huawei dependencies

5.1. Add maven {url ''} to your root-level build.gradle (Project) under buildscript { repositories } and allprojects { repositories }.
5.2. Add classpath 'com.huawei.agconnect:agcp:' under buildscript { dependencies }.
Make sure all the following three lines added to your root-level build.gradle:
5.3. Add implementation 'com.huawei.hms:push:' to your app-level build.gradle (app/build.gradle) under the dependencies section.
5.4. Add apply plugin: 'com.huawei.agconnect' to the very bottom of the app-level build.gradle file.
Make sure there are two following lines in your app-level build.gradle:
Sync Gradle
Make sure to press Sync Now on the banner that pops up after saving.

6. Subscribe to push notifications

Last modified 19d ago