> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chmodlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Add the chmod KYC SDK to your Android app via GitHub Packages.

* **Minimum SDK:** 24 (Android 7.0)
* **Compile SDK:** 35+
* **JDK:** 17-21
* **Kotlin:** 2.0+
* **UI frameworks:** Jetpack Compose and Views

## Add the repository

The SDK is published privately to GitHub Packages, not to Maven Central, so Gradle needs
the repository and credentials before it can resolve it.

`settings.gradle.kts`:

```kotlin lines theme={null}
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/ChmodLab/chmod-android-packages")
            credentials {
                username = System.getenv("GITHUB_ACTOR") ?: providers.gradleProperty("gpr.user").orNull
                password = System.getenv("GITHUB_TOKEN") ?: providers.gradleProperty("gpr.key").orNull
            }
        }
    }
}
```

Credentials come from a GitHub personal access token with `read:packages`.

<Warning>
  Keep the token out of the repository. Put it in `~/.gradle/gradle.properties` locally,
  and in `GITHUB_ACTOR` / `GITHUB_TOKEN` on CI. A PAT committed to source is a credential
  leak, and GitHub will revoke it for you once it notices.
</Warning>

`~/.gradle/gradle.properties`:

```properties lines theme={null}
gpr.user=your-github-username
gpr.key=ghp_yourTokenWithReadPackages
```

## Add the dependency

`gradle/libs.versions.toml`:

```toml lines theme={null}
[versions]
chmod-sdk = "0.0.29"

[libraries]
chmod-kyc-sdk = { module = "com.chmod.kyc:chmod-kyc-sdk-android", version.ref = "chmod-sdk" }
```

`app/build.gradle.kts`:

```kotlin lines theme={null}
android {
    compileOptions {
        isCoreLibraryDesugaringEnabled = true   // Safe default at minSdk 24
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
}

dependencies {
    implementation(libs.chmod.kyc.sdk)
    coreLibraryDesugaring(libs.desugar.jdk.libs)
}
```

## Manifest and permissions

Nothing to add. The SDK's own manifest declares `CAMERA`, `INTERNET`,
`ACCESS_NETWORK_STATE`, `ACCESS_FINE_LOCATION` and `ACCESS_COARSE_LOCATION`, and manifest
merging pulls them into your app. Its activity is declared too, and is `exported="false"`.

<Warning>
  **Do not request camera or location yourself.** The flow asks for them at the right
  moment and turns a refusal into a typed result. Requesting them early gets you a denial
  with no context to show the user.
</Warning>

## R8 and minification

Covered as well. The SDK ships `consumerProguardFiles`, so a minified release build keeps
the public API intact without any rule on your side.

## Next

<CardGroup cols={2}>
  <Card title="Quick start" icon="play" href="/sdk/android/quickstart">
    Launch the flow from Compose or Views.
  </Card>

  <Card title="Handling the result" icon="code-branch" href="/sdk/android/handling-results">
    Every outcome and error code.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.