For the complete documentation index, see llms.txt. This page is also available as Markdown.

Android

External Dependencies

The Sentiance SDK has the following external library dependencies. These are automatically included during the build.

  • Google Play Services: version 18.0.0. A higher version is also acceptable.

  • TensorFlow Lite: a custom build based on version 2.16.2, supporting 16 KB pages. If your app depends on a different version, please reach out to us to address possible incompatibility issues.

Steps

1

Update Your Gradle Build Files

Add the Sentiance repository to your project-level settings.gradle.kts file:

dependencyResolutionManagement {
    ..
    repositories {
        ..
        maven { url = uri("https://repository.sentiance.com") }
    }
}

Add the Sentiance dependencies to your module-level build.gradle.kts file:

plugins {
    ..
}

android {
    ..
}

dependencies {
    ..
    implementation(platform(libs.sentiance.sdk.bom))
    implementation(libs.sentiance.sdk)
}
2

Update Your Version Catalog

In your libs.versions.toml file, specify the Sentiance SDK BOM version. See Versions & Changelog for the latest.

[versions]  
..
sentianceSdkBom = "x.y.z"  

Next, declare the Sentiance library dependencies:

[libraries]  
..
sentiance-sdk-bom = { group = "com.sentiance", name = "sdk-bom", version.ref = "sentianceSdkBom"}  
sentiance-sdk = { group = "com.sentiance", name = "sdk" }  
3

Sync and Verify Your Build

After adding the dependencies, sync your project with Gradle.

If the configuration is correct, the build output should show the SDK artifacts being downloaded from the Sentiance repository:

> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Download https://repository.sentiance.com/com/sentiance/sdk-bom/x.y.z/sdk-bom-x.y.z.pom, took 1 s 68 ms
Download https://repository.sentiance.com/com/sentiance/sdk/x.y.z/sdk-x.y.z.pom, took 312 ms
Download https://repository.sentiance.com/com/sentiance/sdk/x.y.z/sdk-x.y.z.aar, took 2 s 611 ms
Download https://repository.sentiance.com/com/sentiance/sdk/x.y.z/sdk-x.y.z-sources.jar, took 266 ms

BUILD SUCCESSFUL in 10s
4

ProGuard and DexGuard Setup

Proguard Rules

DexGuard Rules

5

Next: Initialize the SDK

After having included the Sentiance SDK, proceed to initializing the SDK.

Last updated