Choose an Android SDK

You can add Amplitude Analytics to an Android app with one of two current SDKs. The Unified SDK for Android includes Session Replay and Feature Experiment. The Android-Kotlin SDK is Analytics only. Use one SDK per app. The Unified SDK already includes the Android-Kotlin SDK, so adding both creates duplicate dependencies.

Choose an SDK

Both current SDKs work from Kotlin and Java, and support Android 5.0 (API level 21) and later.

Product support by SDK

✅ means the SDK installs and configures the product. ➕ means you add the product's own package and set it up yourself.

Choose between the Unified SDK and the Android-Kotlin SDK

The Unified SDK for Android bundles the Android-Kotlin SDK. Tracking, identity, sessions, and autocapture work the same in both, and the Unified SDK's AmplitudeUnified class has every Android-Kotlin SDK method. Choose by the products you need:

  • Two or more products from one setup: install the Unified SDK for Android. It creates Session Replay and Feature Experiment for you, and keeps their device ID, session ID, and user identity in sync with Analytics.
  • Analytics only: install the Android-Kotlin SDK. When you need another product later, add its package or switch to the Unified SDK.

If your app already uses the Android-Kotlin SDK with the Session Replay plugin or the Experiment SDK, you can move to the Unified SDK. Go to Migrate from separate SDKs.

To capture replays in an app that uses a different analytics provider, use the Session Replay standalone SDK instead of either SDK.

Generate type-safe tracking with Ampli

Ampli for the Android-Kotlin SDK generates a tracking library from your tracking plan in Amplitude Data. It wraps the Android-Kotlin SDK and adds one method for each planned event, so the compiler catches misspelled event names and wrong property types. By default, Ampli creates its own SDK instance. To use an instance you already created, including an AmplitudeUnified instance, pass it as client.instance when you load Ampli.

Move off the maintenance Android SDK

The maintenance Android SDK (com.amplitude:android-sdk) receives bug fixes only. New features, such as plugins and autocapture, ship in the Android-Kotlin SDK. To upgrade, go to Migrate to the Android-Kotlin SDK. By default, the Android-Kotlin SDK moves the maintenance SDK's stored events, user ID, and device ID on first launch, so users keep their identity.

Was this helpful?

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