Verify Unified SDK for Android events

The Unified SDK for Android sends analytics events through the bundled Android-Kotlin SDK. An analytics event moves through the same four stages as in the Android-Kotlin SDK: captured, transformed, sent, and received. This page covers the checks specific to the Unified SDK, starting with setup, and links to the Android-Kotlin SDK steps for the other stages.

For problems common to every Amplitude SDK, go to SDK troubleshooting and debugging. For changes between versions, go to the Unified SDK changelog.

Turn on debug logging

AmplitudeUnified has the Android-Kotlin SDK's logger. Set it to DEBUG and filter Logcat on the tag Amplitude:

amplitude.logger.logMode = Logger.LogMode.DEBUG

Experiment logs through its own logger, at the ERROR level by default. To get more Experiment log output, pass a config built with ExperimentConfig.builder():

kotlin
val amplitude = AmplitudeUnified("YOUR_API_KEY", applicationContext) {
    experiment {
        config = ExperimentConfig.builder().debug(true).build()
    }
}

Check that each product installed

Read the accessors after you construct the instance:

kotlin
Log.d("MyApp", "replay=${amplitude.sessionReplay != null} experiment=${amplitude.experiment != null}")

If experiment isn't null but variant() returns only fallbacks, check that Analytics has a device ID, Analytics has a session, and the user isn't opted out. The Experiment client starts, and fetches flags, only after all three are true.

Check what the SDK sent

Analytics uploads go to the same endpoints as the Android-Kotlin SDK. Go to Check what the SDK sent.

One field differs. The Unified SDK puts its own version in front of the Android-Kotlin SDK's library value, so events from version 1.1.0 carry:

json
"library": "amplitude-android-unified/1.1.0-amplitude-analytics-android/1.36.0"

An event without the amplitude-android-unified/ prefix didn't come from AmplitudeUnified. Look for another Amplitude instance in your app.

While Session Replay records, events whose device ID and session ID match the recording also carry [Amplitude] Session Replay ID. If no event has this property, check the Session Replay sampleRate.

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.

On this page