1.2 Download your configuration file (google-services.json) and copy the file on your app directory.
1.3 Add the following dependencies to project >build.gradle file and project > settings.gradle which is located in your project root directory and sync.
buildscript { repositories { google() mavenCentral() maven { url'https://jitpack.io' } // ANDROID Maven repository (Add this line) maven { url'https://developer.huawei.com/repo/'} // HUAWEI Maven repository (Add this line) } dependencies { classpath'com.android.tools.build:gradle:7.0.2' classpath'com.google.gms:google-services:4.3.10'// Add this line
// huawei classpath'com.huawei.agconnect:agcp:1.5.2.300'// Add this line classpath'com.huawei.hms:push:6.3.0.304' } }
// Valid in old android studio app. applyplugin: 'com.google.gms.google-services'// Add this line, Please apply google-services plugin at the bottom of the build file.
1.4 Add the following dependencies to app > build.gradle file which is located in your project app directory and sync.
// Valid in new android studio app. plugins { id'com.android.application' id'com.google.gms.google-services' id'com.huawei.agconnect' }
// Valid in old android studio app. applyplugin: 'com.android.application'
dependencies {
// dengage implementation'com.github.dengage-tech:dengage-android-sdk:x.y.z'//Add this line
// huawei implementation'com.huawei.hms:push:6.1.0.304'//Add this line implementation'com.huawei.hms:ads-identifier:3.4.30.307'//Add this line implementation'com.huawei.agconnect:agconnect-core:1.5.2.300'//Add this line
// gson implementation'com.google.code.gson:gson:2.8.7'//Add this line
1.5 For android sdk minSdkVersion should be 19. (app > build.gradle)
android { compileSdkVersion34 defaultConfig { minSdkVersion19 targetSdkVersion34 versionCode1 versionName"1" testInstrumentationRunner"androidx.test.runner.AndroidJUnitRunner" //applicationId "com.dengage.sdk" // Update this line }
1.6 Run your app and verify your configuration.
2. Configuration
2.1 If you prefer to handle messages by D·engage, paste the following config values into your AndroidManifest.xml file. Thus all incoming push messages that received from D·engage Platform will be generated by the SDK.
<application...> ... <!-- Fcm Messaging Service for handling push messages comes from firebase --> <service android:name="com.dengage.sdk.push.FcmMessagingService" android:exported="false"> <intent-filter> <actionandroid:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <!-- Hms Messaging Service for handling push messages comes from huawei messaging service --> <service android:name="com.dengage.hms.HmsMessagingService" android:exported="false"> <intent-filter> <actionandroid:name="com.huawei.push.action.MESSAGING_EVENT"/> </intent-filter> </service> <!-- For handling push notifications comes to messaging service classes --> <receiverandroid:name="com.dengage.sdk.push.NotificationReceiver" android:exported="false"> <intent-filter> <actionandroid:name="com.dengage.push.intent.RECEIVE"/> <actionandroid:name="com.dengage.push.intent.OPEN"/> <actionandroid:name="com.dengage.push.intent.DELETE"/> <actionandroid:name="com.dengage.push.intent.ACTION_CLICK"/> <actionandroid:name="com.dengage.push.intent.ITEM_CLICK"/> <actionandroid:name="com.dengage.push.intent.CAROUSEL_ITEM_CLICK"/> </intent-filter> </receiver> ... </application>
2.2 Make sure that your app has the following permissions.
3.1 Access Your Dengage Panel Log in to your Dengage Panel. Navigate to Settings > Integrations > Applications and click the New > Android button. On this page, enable the Push Notification option.
3.2Generate a Private Key in Firebase Open your Firebase Console and go to Settings > Service Accounts. Click Generate New Private Key, then confirm by selecting Generate Key.
3.3Securely store the downloaded JSON file containing the private key, as it will be required for integration.
3.4Upload the Private Key File to Dengage Return to the Dengage Android Settings page. In the Cloud Messaging Credentials section, click Select File and upload the JSON file you downloaded from Firebase. Once the file is uploaded, click the Save button to finalize the setup.
Requirements Huawei Developer Account Java JDK installation package Android SDK package Android Studio 3.X HMS Core (APK) 4.X or later Huawei Device or Huawei Cloud Debugging Supports Android API level 4.4 or higher. Information Huawei AdID service ...
SDK Setup Requirements Minimum Android version supported 19+ SDK Installation Dengage SDK is available on JitPack package repository. If you haven't done so yet, add the JitPack repository in your project's build.gradle file: Groovy buildscript { ...
Requirements D·engage Integration Key iOS Push Certificate iOS Device (you need to test on a real device for notifications) A Mac with the latest Xcode iOS version 10 or later (supported by D·engage Mobile SDK) Integration Methods CocoaPods ...
SDK Setup Requirements Minimum iOS version supported 11.0 SDK Installation CocoaPods Integration Dengage is available through CocoaPods. To install it, simply add the following line to your Podfile: Ruby pod 'Dengage', '~> 5.89' Run pod install via ...
Requirements D·engage Application Definition - Required for configuring push notification settings. Access to your Website Files - Needed to add the Service Worker File and the Injection Script. D·engage Web SDK provides an interface that handles ...