---
title: Install Sahha SDK for Android
---


Set up your Android project and add the Sahha SDK.

On Android, the Sahha SDK reads health and fitness data from **Health Connect**, Google's unified health data layer. This guide walks you through checking your project requirements, preparing your manifest, and installing the library.

---

## Prerequisites

{% callout title="Your Android project must support:" %}

- **compileSdk 36** or above
- **Kotlin 1.9.24** or above
- **Gradle 8.11.1** or above
- **Android Gradle Plugin (AGP) 8.10** or above

### Android OS support

- For Device and Activity support, [Android 8.0 (API level 26)](https://developer.android.com/tools/releases/platforms#8.0) or above
- For Sleep support, [Android 10.0 (API level 29)](https://developer.android.com/tools/releases/platforms#10) or above
- For Health Connect support, [Android 9.0 (API level 28)](https://developer.android.com/tools/releases/platforms#9.0) or above
  - Devices running Android 9–13 require the [Health Connect app from the Play Store](https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata&hl=en)
  - Health Connect is pre-installed on [Android 14 (API level 34)](https://developer.android.com/health-and-fitness/guides/health-connect/develop/get-started#android-14) and above

{% /callout %}

---

## Set Up Android Project

The Sahha SDK requires `uses-permission` entries in your `AndroidManifest.xml` for every health sensor your app will access. Which permissions you need depends on which sensors you choose — that happens in [Step 4) Enable Data Collection](/docs/connect/sdk/collection).

Open your manifest and add a starter set. Most apps begin with steps and sleep:

```xml title="AndroidManifest.xml"
<manifest ...>

    <!-- background access -->
    <uses-permission android:name="android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND" />

    <!-- steps -->
    <uses-permission android:name="android.permission.health.READ_STEPS" />

    <!-- sleep -->
    <uses-permission android:name="android.permission.health.READ_SLEEP" />

    <application ...>
        ...
    </application>
</manifest>
```

{% callout title="Where to find AndroidManifest.xml" %}

- **Native Android:** `app/src/main/AndroidManifest.xml`
- **Flutter:** `android/app/src/main/AndroidManifest.xml`
- **React Native:** `android/app/src/main/AndroidManifest.xml`

{% /callout %}


{% callout title="Add background permission" type="warning" %}

In order to read health data in the background, Android requires this permission is added to the manifest:

<uses-permission android:name="android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND" />


{% /callout %}

You will revisit this file when you choose your full set of sensors in [Step 4) Enable Data Collection](/docs/connect/sdk/collection#android-uses-permission-important-info). The full list of sensor-to-permission mappings is documented there.

---

## Install the Library

Add the Sahha repository and dependency to your Gradle files.

[View Sahha Android SDK on GitHub](https://github.com/sahha-ai/sahha-android-sdk)

### 1. Add the repository

In your project's `settings.gradle`, make sure `mavenCentral()` is included:

```gradle title="settings.gradle"
repositories {
    mavenCentral()
}
```

### 2. Add the dependency

In your app module's `build.gradle`, add the Sahha SDK:

```gradle title="build.gradle"
dependencies {
    implementation 'ai.sahha.android:sahha-api:+'
}
```

---

## Import the Module

Import Sahha in any file where you use the SDK:

```kotlin title="MainActivity.kt"
import sdk.sahha.android.source.*
```

---

## Next Steps

Continue to [Step 2) Configure Settings](/docs/connect/sdk/configuration) to set your environment and notification preferences.
