Installation

Enhance your Android app with the ability to interact directly with users by integrating the Dixa Messenger SDK.

Requirements

RequirementDetails
AndroidAPI 23 (Android 6.0, Marshmallow)
compileSdk34 recommended: the SDK is built against API 34
Core library desugaringRequired if your app's minSdk is below 26. See Required desugaring support
Firebase Cloud MessagingOnly for push notifications. See Push notification handling
Messenger tokenAn admin can find it in the Dixa Dashboard under Settings > Messenger > (your messenger) > Setup

Support matrix

Each SDK version is built with the following versions of the Android Gradle Plugin (AGP) and Kotlin. Your app can use these versions or newer ones.

SDK VersionAGP VersionKotlin Version
1.7.2 and later7.2.11.8.22
1.7.18.9.22.0.21
1.4.2 - 1.6.27.2.11.8.0

⚠️ Important: To ensure ongoing security and compatibility, the SDK may periodically raise its minimum required Kotlin and AGP versions. This helps prevent known vulnerabilities and align with modern Android tooling.

Install Dixa Messenger

The SDK is hosted on Maven Central. New Android Studio projects already declare Maven Central in settings.gradle.kts. If yours doesn't, add it:

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Then add the SDK to the dependencies of your app module. Replace <VERSION> with the latest version from the release notes or Maven Central.

// app/build.gradle.kts
dependencies {
    implementation("com.dixa:messenger-sdk:<VERSION>")
}

If your project uses Groovy build files:

// app/build.gradle
dependencies {
    implementation 'com.dixa:messenger-sdk:<VERSION>'
}

Required desugaring support

The SDK uses Java 8+ APIs such as java.time. If your app's minSdk is below 26, enable core library desugaring in your app module. Without it, the app builds but crashes at runtime on Android 6.0 to 7.1 (API 23 to 25).

// app/build.gradle.kts
android {
    compileOptions {
        isCoreLibraryDesugaringEnabled = true
    }
}

dependencies {
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}

Groovy:

// app/build.gradle
android {
    compileOptions {
        coreLibraryDesugaringEnabled true
    }
}

dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
}

☝️ Note: desugar_jdk_libs 2.x needs AGP 7.4 or newer. With an older AGP, use version 1.1.5.

Snapshots

Snapshots provide early access to the latest features and fixes. Keep in mind that while they offer the newest changes, they may not always be as stable as the official releases.

To use a snapshot version, add the Maven Central snapshot repository:

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        maven {
            url = uri("https://central.sonatype.com/repository/maven-snapshots/")
            mavenContent { snapshotsOnly() }
        }
    }
}

Then depend on the snapshot version:

// app/build.gradle.kts
dependencies {
    implementation("com.dixa:messenger-sdk:<VERSION>-SNAPSHOT")
}

Replace <VERSION> with the version of the snapshot you wish to use.

⚠️ Caution: Snapshot versions are for testing the very latest developments and may not be stable for production use.

On this page