Huawei Integration
Please be aware that geo-based messaging is not available for HMS (Huawei Mobile Services) devices as it’s built upon Google location services.

Requirements

Integration

1. Get agconnect-services.json

1.1. Go to AppGallery Connect -> Projects List and select a project to configure.
1.2. Press agconnect-services.json in the App information section to download a configuration file.
Could not load image
1.3. Put the downloaded file into your Android Studio project (YOUR_PROJECT/app/agconnect-services.json).

2. Generate Signing Certificate Fingerprint

Follow Generating a Signing Certificate Fingerprint to generate a signing certificate fingerprint.

3. Add the pushwoosh-huawei module

3.1. Add the pushwoosh-huawei module to your app-level build.gradle:
implementation 'com.pushwoosh:pushwoosh-huawei:6.+'
Replace "+" with the current version of Pushwoosh: https://github.com/Pushwoosh/pushwoosh-android-sdk/releases/latest

4. Add Huawei dependencies

4.1. Add maven {url 'https://developer.huawei.com/repo/'} to your root-level build.gradle (Project) under buildscript { repositories } and allprojects { repositories }.
4.2. Add classpath 'com.huawei.agconnect:agcp:1.3.1.300' under buildscript { dependencies }.
Make sure all the following three lines added to your root-level build.gradle:
4.3. Add implementation 'com.huawei.hms:push:5.3.0.304' to your app-level build.gradle (app/build.gradle) under the dependencies section.
4.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.

5. Subscribe to push notifications

Pushwoosh.getInstance().registerForPushNotifications();

Share your feedback with us

Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.

Next steps

Copy link
On this page
Requirements
Integration
1. Get agconnect-services.json
2. Generate Signing Certificate Fingerprint
3. Add the pushwoosh-huawei module
4. Add Huawei dependencies
5. Subscribe to push notifications
Share your feedback with us
Next steps