CleverTap Huawei Push SDK provides an out of the box service to use the Huwaei Push Kit.
The first step to access the Huawei cloud push is registered as a Huawei developer on the Huawei Website.
Once you login to the console, enable the Push Kit.
Download the agconnect-services.json
file from the Huawei Console. Move the downloaded agconnect-services.json
file to the app directory of your Android Studio project.
- Add the following dependency to your Project-level
build.gradle
file
buildscript {
repositories {
// FOR HUAWEI ADD THIS
maven {url 'http://developer.huawei.com/repo/'}
}
dependencies {
// FOR HUAWEI ADD THIS
classpath "com.huawei.agconnect:agcp:1.9.1.301"
}
}
allprojects {
repositories {
// FOR HUAWEI ADD THIS
maven {url 'https://developer.huawei.com/repo/'}
}
}
- Add the following to your app’s
build.gradle
file
implementation "com.clevertap.android:clevertap-hms-sdk:1.4.0"
implementation "com.huawei.hms:push:6.11.0.300"
//At the bottom of the file add this
apply plugin: 'com.huawei.agconnect'