Installation
Minimum requirements
minSdk21 (Android 5.0) or higher;targetSdkandcompileSdk35 or newer.- Android Gradle Plugin 8.6.1 or newer, Gradle Wrapper 8.7 or compatible.
- Kotlin 1.9.10 or newer.
- JDK 17 (Eclipse Temurin 17 recommended).
jvmTarget,sourceCompatibility,targetCompatibility—17. - The project uses AndroidX (Jetpack).
Adding the SDK
-
Add the edna Maven repository to
settings.gradle(maven-pub.edna.iois public, no credentials needed):// settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://maven-pub.edna.io/repository/maven-public/' }
}
}Legacy projectsIf your project uses
allprojects { repositories { ... } }in the rootbuild.gradle, addmaven { url '...' }there. In new projects withFAIL_ON_PROJECT_REPOS, that approach does not work. -
Add the dependency:
// app module build.gradle
def edna_chatcenter_version = "5.21.0"
dependencies {
releaseImplementation "edna.chatcenter.ui.android:release:$edna_chatcenter_version"
debugImplementation "edna.chatcenter.ui.android:debug:$edna_chatcenter_version"
}debug — contains additional diagnostics and logging tools; use for development. release — an optimized artifact for production builds.
If your app has build types other than
debugandrelease(e.g.,staging), addmatchingFallbacks = ['release']— otherwise the build will fail withNo matching variant. Details: Troubleshooting.
What the SDK adds to the manifest
After the dependency is added, during the build the following are automatically merged into the final AndroidManifest.xml of the app:
- Permissions:
INTERNET,ACCESS_NETWORK_STATE,CAMERA,RECORD_AUDIO,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE(up to API 28),WAKE_LOCK,DOWNLOAD_WITHOUT_NOTIFICATION,FOREGROUND_SERVICE,POST_NOTIFICATIONS.CAMERA,RECORD_AUDIO,POST_NOTIFICATIONSare dangerous; the SDK shows runtime dialogs itself. - Activities:
ChatActivity,ImagesActivity,PermissionsActivity. - FileProvider with authority
${applicationId}.edna.chatcenter.ui.fileprovider. <queries>forIntent.ACTION_VIEWwith thehttpsscheme (opening links on Android 11+).- Application flags:
android:largeHeap="true",android:hardwareAccelerated="true",android:fullBackupContent="@xml/ecc_backup_rules".
The SDK sets android:largeHeap="true" and android:fullBackupContent="@xml/ecc_backup_rules" at the <application> level. If this is not desirable in your app, or you already have your own backup rules, override them in AndroidManifest.xml via tools:replace:
<application
tools:replace="android:largeHeap,android:fullBackupContent"
android:largeHeap="false"
android:fullBackupContent="@xml/my_backup_rules">
Obfuscation
The SDK ships consumer-proguard rules automatically through consumerProguardFiles of its AAR artifact — with minifyEnabled true, R8/ProGuard applies them without your involvement. No manual rules are needed for a basic integration.
If a release build crashes with ClassNotFoundException or NoSuchMethodException, or you have R8 full mode enabled (android.enableR8.fullMode=true), see Troubleshooting → Crashes in release builds.
Related sections
- Quick start — SDK initialization and the first chat opening.
- SDK initialization — the
ChatCenterUIconstructor,init()andinitAsync(). - Notifications — push (FCM/HMS) setup,
POST_NOTIFICATIONS. - Troubleshooting — common build and runtime issues.