Amplitude's Guides and Surveys Android SDK enables you to deploy Guides and Surveys in your Android applications.
The Guides and Surveys Android SDK requires:
You can use Guides and Surveys independently of Amplitude Analytics.
Guides and Surveys supports different installation options to work best with your existing Amplitude implementation, if you have one.
If your app uses the Amplitude Analytics Android-Kotlin SDK, make sure you are using version 1.0 or later. Then add the following dependencies to your application's build.gradle.kts file:
dependencies {
// Amplitude Engagement SDK
implementation("com.amplitude:amplitude-engagement-android:3.+")
// Amplitude Analytics SDK (required dependency)
implementation("com.amplitude:analytics-android:1.+")
}
import com.amplitude.android.engagement.AmplitudeEngagement
import com.amplitude.android.engagement.AmplitudeInitOptions
// Initialize the SDK
val amplitudeEngagement = AmplitudeEngagement(
context = applicationContext,
apiKey = "YOUR_API_KEY",
options = AmplitudeInitOptions()
)
// Add the plugin to your Amplitude instance
val amplitude = Amplitude(applicationContext)
amplitude.add(amplitudeEngagement.getPlugin())
This call uses the Amplitude Analytics Android SDK's plugin system to integrate Guides and Surveys with your existing Analytics setup. Adding the plugin means Guides and Surveys initializes alongside Analytics, shares the same API key and user identity, and communicates with it directly. You don't need to call boot separately.
| Parameter | Type | Description |
|---|---|---|
apiKey |
string |
Required. API key of the Amplitude project you want to use. |
initOptions.serverZone |
EU or US |
Optional. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. Default: US |
initOptions.serverUrl |
string |
Optional. Sets a custom server URL for API requests. Useful for proxy setups. Default: https://gs.amplitude.com (US) or https://gs.eu.amplitude.com (EU) |
initOptions.cdnUrl |
string |
Optional. Sets a custom CDN URL for static assets. Useful for proxy setups. Default: https://cdn.amplitude.com (US) or https://cdn.eu.amplitude.com (EU) |
initOptions.mediaUrl |
string |
Optional. Sets a custom URL for proxying nudge images. Useful for proxy setups when images are blocked. Default: https://engagement-static.amplitude.com (US) or https://engagement-static.eu.amplitude.com (EU) |
initOptions.logLevel |
LogLevel.None or LogLevel.Error or LogLevel.Warn or LogLevel.Verbose or LogLevel.Debug. |
Optional. Sets the log level. Default: LogLevel.Warn |
initOptions.locale |
string |
Optional. Sets the locale for localization. Default: undefined. Not setting a language means the default language is used. |
Make sure the API key you provide to Guides & Surveys matches the API key used to initialize your Amplitude Analytics SDK.
amplitude.add, you are technically done installing. While screen tracking and element targeting are optional, Amplitude recommends that you set up URL handling for preview mode.If your app doesn't use the Amplitude Analytics Android-Kotlin SDK 1.0+, you can still install Guides and Surveys, but you need to call .boot directly instead of using the Analytics SDK plugin system.
integrations in your boot call to send Guides and Surveys events to your analytics provider. Without it, guide insights, survey insights, and survey responses won't appear.forwardEvent to enable the On event tracked trigger. Without it, you can only trigger guides and surveys on screen load or other non-event conditions.Add the following dependencies to your application's build.gradle.kts file:
dependencies {
// Amplitude Engagement SDK
implementation("com.amplitude:amplitude-engagement-android:2.+")
}
import com.amplitude.android.engagement.AmplitudeEngagement
import com.amplitude.android.engagement.AmplitudeInitOptions
// Initialize the SDK
val amplitudeEngagement = AmplitudeEngagement(
context = applicationContext,
apiKey = "YOUR_API_KEY",
options = AmplitudeInitOptions()
)
| Parameter | Type | Description |
|---|---|---|
apiKey |
string |
Required. API key of the Amplitude project you want to use. |
initOptions.serverZone |
EU or US |
Optional. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. Default: US |
initOptions.serverUrl |
string |
Optional. Sets a custom server URL for API requests. Useful for proxy setups. Default: https://gs.amplitude.com (US) or https://gs.eu.amplitude.com (EU) |
initOptions.cdnUrl |
string |
Optional. Sets a custom CDN URL for static assets. Useful for proxy setups. Default: https://cdn.amplitude.com (US) or https://cdn.eu.amplitude.com (EU) |
initOptions.mediaUrl |
string |
Optional. Sets a custom URL for proxying nudge images. Useful for proxy setups when images are blocked. Default: https://engagement-static.amplitude.com (US) or https://engagement-static.eu.amplitude.com (EU) |
initOptions.logLevel |
LogLevel.None or LogLevel.Error or LogLevel.Warn or LogLevel.Verbose or LogLevel.Debug. |
Optional. Sets the log level. Default: LogLevel.Warn |
initOptions.locale |
string |
Optional. Sets the locale for localization. Default: undefined. Not setting a language means the default language is used. |
Make sure the API key you provide to Guides & Surveys matches the API key used to initialize your Amplitude Analytics SDK.
// Basic boot with user ID
amplitudeEngagement.boot("USER_ID")
// Advanced boot with options
let bootOptions = AmplitudeBootOptions(
userId: "USER_ID",
deviceId: "DEVICE_ID",
userProperties: mapOf("key" to "value")
integrations = arrayOf({ event: BaseEvent ->
// Custom event handler
// Dummy example here:
println("event: ${event.eventType} properties: ${event.eventProperties}")
})
)
amplitudeEngagement.boot(options: bootOptions)
amplitude.boot, you are technically done installing. While screen tracking and element targeting are optional, Amplitude recommends that you set up URL handling for preview mode.After installing the SDK, add your Android application to your Amplitude project settings so it appears as a platform option when you create guides and surveys.
To add your application:
After you add your application, it appears as a platform option when you create or edit guides and surveys. This enables you to deliver guides and surveys to your Android app users.
Minimum SDK version is available for versions 3.0.0 and later. Use this setting as a safety control when you identify a critical issue in an older SDK release.
To configure a minimum SDK version:
When you set this value, Guides and Surveys compares the configured minimum with the SDK version in each app build:
This setting lets you stop guides and surveys on known problematic SDK versions without rolling back your application release.
Suppose app version 120 uses Guides and Surveys SDK 3.0.2, and app version 121 uses Guides and Surveys SDK 3.1.0 with a bug fix. If you set Minimum SDK version to 3.1.0:
120 no longer loads Guides and Surveys.121 continues to load Guides and Surveys.Required for screen-based targeting and the Time on Screen trigger. The screen string (for example, "HomeScreen") is compared with the string provided in the guide or survey page targeting section.
// Track screen views to trigger guides based on screens
amplitudeEngagement.screen("HomeScreen")
Screen Viewed events from the Amplitude Android-Kotlin SDK's Autocapture feature are auto-forwarded to the Engagement SDK.Pin and tooltip guides require the ability for the SDK to target specific elements on screen.
Use Amplitude Engagement's .amplitudeView modifier to tag Jetpack Compose views. Pass your instance of AmplitudeEngagement as a parameter to .amplitudeView. Configure a CompositionLocalProvider and access it in your view hierarchy or pass your instance as a parameter to your composable views.
// Jetpack Compose Tagging
@Composable
fun MyView() {
// Use your instance of Amplitude Engagement by creating a Composition context or passing as a param
val engagement = LocalEngagement.current
Box {
Button(
modifier = Modifier.amplitudeView(
engagement,
tag = "my-button",
onTrigger = {
// Optional code to run with tap element action
}
)
)
}
}
Guides and Surveys also supports non-Jetpack Compose views. The SDK uses the tag, contentDescription, or resourceName fields to check for a matching selector. You need to set only one of these.
Configure this in your existing layout XMLs or programmatically by setting the properties on the view instance.
<!-- in my_layout.xml -->
<LinearLayout>
<!-- Set either contentDescription or tag to your desired selector -->
<Button
android:contentDescription="my-button"
android:tag="my-button" />
</LinearLayout>
// Non Jetpack Compose Programmatic Tagging
val button = Button(this)
// Set the contentDescription
button.contentDescription = "my-button"
// Or set the tag
button.tag = "my-button"
This section describes additional methods available in the Android SDK for Amplitude Guides and Surveys, including:
setThemeMode.setRouter, which lets you handle navigation logic in your app.reset to move a guide or survey back to a specific step.list() method.Configure the visual theme mode if your app supports light and dark modes.
// Set the theme mode
amplitudeEngagement.setThemeMode(ThemeMode.DARK) // Options: AUTO, LIGHT, DARK
Set the Run callback action on a guide or survey button to execute the callback.
engagement.addCallback(key: String, func: () -> Unit)
| Parameter | Type | Description |
|---|---|---|
key |
String |
Required. Refer to this callback by key when setting a callback action on a guide or survey. |
func |
() -> Unit |
Required. The callback to execute. |
engagement.addCallback("show-alert") {
this.runOnUiThread {
android.app.AlertDialog.Builder(this)
.setTitle("Callback")
.setMessage("Callback has been executed!")
.setPositiveButton("OK", null)
.show()
}
}
Configure how Guides and Surveys handles screen navigation.
engagement.setRouter { identifier ->
// Your screen handling and navigation
}
| Parameter | Type | Description |
|---|---|---|
identifier |
String |
Required. A screen identifier (or route) that tells your app where to navigate. |
router (callback) |
(String) -> Unit |
Required. A callback you implement to handle screen navigation when Guides or Surveys need to change screens. |
setRouter(), update the link behavior setting in the Guides and Surveys interface. For any link actions in your guides or surveys, change the behavior to Use router. This ensures that the guide or survey uses the custom router function instead of the default browser navigation.Reset a guide or survey to a specific step.
amplitudeEngagement.reset(key = "GUIDE_KEY", stepIndex = 0)
| Parameter | Type | Description |
|---|---|---|
key |
string |
Required. The guide or survey's key. |
stepIndex |
number |
Required. The zero-based index of the step to reset to. Defaults to the initial step. |
Retrieve a list of all live guides and surveys along with their status.
val guidesAndSurveys = amplitudeEngagement.list()
Display a specific guide or survey. Ignores any targeting rules and limits except for screen targeting.
amplitudeEngagement.show(key = "GUIDE_KEY")
| Parameter | Type | Description |
|---|---|---|
key |
string |
Required. The guide or survey's key. |
If you don't use the Amplitude Analytics Android SDK plugin (that is, you called boot directly), use forwardEvent to enable the On event tracked trigger in Guides and Surveys. Forwarded events aren't sent to Amplitude servers. The SDK uses them only for local trigger evaluation.
// Forward events from Amplitude to trigger guides
val event = BaseEvent()
amplitudeEngagement.forwardEvent(event)
Close all active guides and surveys.
amplitudeEngagement.closeAll()
Previewing guides and surveys direclty in your application allows you to experience what your users will. Previewing makes it much easier to iterate on copy, targeting rules, trigger logic, etc.
To locate the URL scheme:
amp-abcdefgh12345678.Add the following intent filter to the main activity to your project's AndroidManifest.xml file:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Add your URL scheme from Amplitude Dashboard here -->
<!-- ex: android:scheme="amp-12345" -->
<data android:scheme="<your-unique-scheme-id>" />
</intent-filter>
</activity>
// In your Activity
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
amplitudeEngagement.handleLinkIntent(intent)
}
Pins and tooltips can't target views or elements that are:
You can access the changelog here.
June 23rd, 2025
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2026 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.