> For the complete documentation index, see [llms.txt](https://docs.sentiance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sentiance.com/getting-started/sdk-integration/2.-including-the-sdk/android.md).

# Android

## External Dependencies

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

* **Google Play Services**: version <mark style="color:$success;">**`18.0.0`**</mark>. A higher version is also acceptable.
* **TensorFlow Lite**: a custom build based on version <mark style="color:$success;">**`2.16.2`**</mark>, supporting 16 KB pages. If your app depends on a different version, please reach out to us to address possible incompatibility issues.

## Steps

{% stepper %}
{% step %}

### Update Your Gradle Build Files

Add the Sentiance repository to your **project-level** <mark style="color:$success;">**`settings.gradle.kts`**</mark> file:

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

Add the Sentiance dependencies to your **module-level** <mark style="color:$success;">**`build.gradle.kts`**</mark> file:

```kotlin
plugins {
    ..
}

android {
    ..
}

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

{% endstep %}

{% step %}

### Update Your Version Catalog

In your <mark style="color:$success;">**`libs.versions.toml`**</mark> file, specify the Sentiance SDK BOM version. See [Versions & Changelog](/sdk/versions-and-changelog.md) for the latest.&#x20;

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

Next, declare the Sentiance library dependencies:

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

{% endstep %}

{% step %}

### 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:

```log
> 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
```

{% endstep %}

{% step %}

### ProGuard and DexGuard Setup

{% hint style="success" %}

### Proguard Rules <a href="#proguard-rules" id="proguard-rules"></a>

The Sentiance SDK includes all necessary Proguard rules. These are automatically applied to your app during the build process.
{% endhint %}

{% hint style="warning" %}

### **DexGuard Rules**

If you are using DexGuard, please add the following rule:

```python
-keepresourcexmlelements manifest/application/meta-data@name=com.sentiance.sdk.**
```

This makes sure that metadata defined in the SDK library manifest files do not get stripped.
{% endhint %}
{% endstep %}

{% step %}

### Next: Initialize the SDK

After having included the Sentiance SDK, proceed to [initializing the SDK](/getting-started/sdk-integration/3.-sdk-initialization/android.md#steps).
{% endstep %}
{% endstepper %}
