---
title: Unified SDK for Android reference
description: "Every public class, accessor, and configuration option in the Amplitude Unified SDK for Android, verified against version 1.1.0, which bundles Android-Kotlin SDK 1.36.0."
product: analytics
lang: en
last_updated: 2026-11-04
token_estimate: 1984
---
# Unified SDK for Android reference

This reference documents every public class of `com.amplitude:unified-android` and every option on `UnifiedConfigurationBuilder`, verified against version 1.1.0. That version bundles Android-Kotlin SDK 1.36.0 (`com.amplitude:analytics-android`), Session Replay Android plugin 0.31.0, and Experiment Android SDK 1.18.0. Every analytics method behaves as the [Android-Kotlin SDK reference](https://amplitude.com/docs/sdks/analytics/android/android-kotlin-sdk/reference) describes. For changes between versions, go to the [Unified SDK changelog](https://github.com/amplitude/Amplitude-Kotlin/blob/main/unified/CHANGELOG.md).

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

```kotlin
import com.amplitude.unified.AmplitudeUnified
import com.amplitude.unified.UnifiedConfigurationBuilder
```

## Exports

| Class | Description |
| --- | --- |
| [`AmplitudeUnified`](#amplitudeunified) | The client. Extends `com.amplitude.android.Amplitude`, so it has every Android-Kotlin SDK method. |
| [`UnifiedConfigurationBuilder`](#unifiedconfigurationbuilder) | Holds the analytics, Session Replay, and Experiment options. |
| [`SessionReplayConfigurationBuilder`](#sessionreplayconfigurationbuilder) | Session Replay options. |
| [`ExperimentConfigurationBuilder`](#experimentconfigurationbuilder) | Experiment options. |
| `BuildConfig` | Android build constants. `BuildConfig.UNIFIED_VERSION` holds the Unified SDK version that the SDK writes into each event's `library`. |

Every analytics method, such as `track()`, `identify()`, `setUserId()`, `reset()`, `flush()`, and `add()`, comes from the Android-Kotlin SDK. Go to the [Android-Kotlin SDK reference](https://amplitude.com/docs/sdks/analytics/android/android-kotlin-sdk/reference).

## AmplitudeUnified

```kotlin
open class AmplitudeUnified : com.amplitude.android.Amplitude
```

### Constructors

```kotlin
AmplitudeUnified(
    apiKey: String,
    applicationContext: Context,
    configure: UnifiedConfigurationBuilder.() -> Unit = {},
)

AmplitudeUnified(configurationBuilder: UnifiedConfigurationBuilder)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `apiKey` | `String` | Your Amplitude project API key. |
| `applicationContext` | `Context` | An Android context. The SDK uses `context.applicationContext` when it isn't `null`. |
| `configure` | `UnifiedConfigurationBuilder.() -> Unit` | Optional. Sets options on a new [`UnifiedConfigurationBuilder`](#unifiedconfigurationbuilder). |
| `configurationBuilder` | `UnifiedConfigurationBuilder` | A builder you configured. Same result as [`UnifiedConfigurationBuilder.build()`](#unifiedconfigurationbuilder). |

The first constructor has `@JvmOverloads`, so Java can call `new AmplitudeUnified(apiKey, context)` without the lambda.

The constructor builds Analytics, then installs Session Replay, then Experiment, each as a plugin. If a product throws during setup, the SDK logs `Failed to install plugin "<name>": <exception>`, skips that product, and keeps the rest running. Analytics finishes loading stored identity in the background. Wait for `isBuilt` before reading identity that must come from storage:

```kotlin
amplitude.isBuilt.await() // inside a coroutine
val deviceId = amplitude.getDeviceId()
```

### analytics

```kotlin
val analytics: AmplitudeUnified
```

Returns the same instance. Use it when you want call sites to read `amplitude.analytics.track(...)`.

### sessionReplay

```kotlin
val sessionReplay: SessionReplay?
```

Returns the Session Replay client (`com.amplitude.android.sessionreplay.SessionReplay`), or `null` when Session Replay is turned off or failed to install. Call `start()` to start or resume capture and `stop()` to pause it. For other members, go to the [Session Replay Android plugin](https://amplitude.com/docs/sdks/session-replay/session-replay-android-plugin).

### experiment

```kotlin
val experiment: ExperimentClient?
```

Returns the Experiment client (`com.amplitude.experiment.ExperimentClient`), or `null` when Experiment is turned off, failed to install, or the instance holds more than one Experiment plugin. For client methods such as `variant()`, `fetch()`, and `all()`, go to the [Experiment Android SDK](https://amplitude.com/docs/sdks/experiment-sdks/experiment-android).

## UnifiedConfigurationBuilder

```kotlin
open class UnifiedConfigurationBuilder(apiKey: String, applicationContext: Context)
```

| Member | Description |
| --- | --- |
| `analytics: ConfigurationBuilder` | The Android-Kotlin SDK's `com.amplitude.android.ConfigurationBuilder`. It accepts every [Android-Kotlin SDK configuration option](https://amplitude.com/docs/sdks/analytics/android/android-kotlin-sdk/reference#configuration-options). Java: `getAnalytics()`. |
| `sessionReplay: SessionReplayConfigurationBuilder` | Go to [SessionReplayConfigurationBuilder](#sessionreplayconfigurationbuilder). Java: `getSessionReplay()`. |
| `experiment: ExperimentConfigurationBuilder` | Go to [ExperimentConfigurationBuilder](#experimentconfigurationbuilder). Java: `getExperiment()`. |
| `analytics(configure)`, `sessionReplay(configure)`, `experiment(configure)` | Apply a lambda to the matching builder and return this builder, so calls chain. |
| `build(): AmplitudeUnified` | Creates the client. |

The SDK copies the options when it builds the client. Changing a builder afterward has no effect on that client.

```java
UnifiedConfigurationBuilder builder =
    new UnifiedConfigurationBuilder("YOUR_API_KEY", getApplicationContext());
builder.getAnalytics().setFlushQueueSize(20);
builder.getExperiment().setDeploymentKey("YOUR_DEPLOYMENT_KEY");
AmplitudeUnified amplitude = builder.build();
```

## SessionReplayConfigurationBuilder

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `enabled` | `Boolean` | `true` | When `false`, the SDK doesn't install Session Replay, and `sessionReplay` returns `null`. |
| `sampleRate` | `Number` | `0.0` | Fraction of sessions to record, from `0.0` to `1.0`. The default records nothing. |
| `enableRemoteConfig` | `Boolean` | `true` | Turns on Session Replay remote configuration from Amplitude. |
| `serverUrl` | `String?` | `null` | A proxy URL for Session Replay uploads. |
| `bandwidthLimitBytes` | `Int?` | `null` | Daily upload limit on metered networks, in bytes. `null` keeps the Session Replay default. |
| `storageLimitMB` | `Int?` | `null` | Local storage limit for recordings, in megabytes. `null` keeps the Session Replay default. |
| `privacyConfig` | `PrivacyConfig` | `PrivacyConfig()` | Masking rules. Go to the [Session Replay Android plugin](https://amplitude.com/docs/sdks/session-replay/session-replay-android-plugin). |
| `autoStart` | `Boolean` | `true` | Starts capture when the plugin finishes setup. Set `false` and call `sessionReplay?.start()` to choose when capture starts. |
| `recordLogOptions` | `RecordLogOptions` | `RecordLogOptions()` | Options for recording app logs into replays. |
| `captureWebViews` | `Boolean` | `false` | Records eligible WebView content. |

Session Replay takes the API key, server zone, device ID, and session ID from Analytics. It has no user ID of its own.

## ExperimentConfigurationBuilder

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `enabled` | `Boolean` | `true` | When `false`, the SDK doesn't install Experiment, and `experiment` returns `null`. |
| `deploymentKey` | `String?` | `null` | The Experiment deployment key. When `null`, Experiment uses the Analytics API key. |
| `config` | `ExperimentConfig` | `ExperimentConfig()` | Every [Experiment Android SDK option](https://amplitude.com/docs/sdks/experiment-sdks/experiment-android). The SDK replaces `instanceName`, `serverZone`, the user provider, and the exposure tracking provider with values from Analytics. |

