Getting started
The Ada Android SDK is a Kotlin library that you can use to embed your Ada AI Agent into your native Android application.
It also supports actions and settings that you can use to customize the behavior of your AI Agent. For example, you might want to set the language, or pass metadata. The Android SDK reference covers these options and more.
You’ll need an active Ada AI Agent handle and access to the Ada Dashboard to use the SDK. To gain access, please reach out to an Ada Account Manager.
This guide covers the new Ada Android SDK. If you are migrating from the existing SDK (support.ada.embed.*), see Upgrade from the existing Android SDK below.
Compatibility
The published artifact is compiled with Kotlin 2.2.20 metadata. If your app is pinned to an older Kotlin compiler, upgrade that toolchain before integrating the SDK.
Install the Android SDK
Install the SDK from Maven Central. Add the dependency to your app-level build.gradle file:
Replace <version> with the latest version on Maven Central.
You only need this one artifact. It contains the embedded view, the full-screen activity, and the dialog. Older install guides that mention multiple Ada Android artifacts do not apply to this SDK.
Make sure your project’s build.gradle file includes mavenCentral() in the repositories block:
After adding the dependency, synchronize your project.
Launch Ada
The SDK provides three integration surfaces. All three ship in the same artifact.
XML
The simplest way to start is via XML. Replace my-handle with the handle for your AI Agent.
The ada_handle attribute is required to display the view. If you specify it as an attribute, the conversation loads when the view attaches to its parent. If you don’t specify it, initialize the view later with initialize(settings: AdaMessagingView.Settings):
Programmatically
To create the view in code, pass a context to the constructor, then initialize it with a settings object:
Finally, add the view to your container to display it.
Most apps only need handle. Leave cluster unset unless Ada tells you your AI Agent is hosted on a non-default cluster.
Activity
Use AdaMessagingActivity to open the conversation in a separate, full-screen window. Create an Intent, put the settings in it with the key AdaMessagingActivity.EXTRA_SETTINGS, then start the activity:
You can subclass AdaMessagingActivity like a regular Android activity. Call getAdaView() from your subclass to access the underlying AdaMessagingView.
Dialog
Use AdaMessagingDialog to display the conversation on top of the current window. Pass the settings through the fragment arguments with the key AdaMessagingDialog.ARGUMENT_SETTINGS:
Choose a runtime
The SDK can load two web runtimes inside its WebView:
- Legacy preserves the behavior of Ada’s existing Chat SDK. This is the default, and it remains fully supported.
- Messaging is Ada’s next-generation runtime. Features such as headless mode, identityToken, and sendMessage require it.
Opt into the Messaging runtime explicitly:
If you do nothing, the SDK stays on the Legacy runtime. That keeps a package upgrade free of end-user-visible conversation changes.
Runtime commands
Once the view is initialized, you can interact with it at runtime:
See the Android SDK reference for the full list of actions.
File uploads
AdaMessagingActivity and AdaMessagingDialog handle file selection for you. If you embed AdaMessagingView directly and your conversation flows use file uploads, set filePickerCallback:
Return true to tell the SDK that your app handles the picker flow. You can store the callback and invoke onFileTaken(uri) later, or pass null to cancel the request.
Upgrade from the existing Android SDK
If you are migrating from the existing Ada Android SDK, the lowest-risk path is:
- Replace the old Ada Android dependencies with the single
cx.ada:messaging-androidartifact. - Rename imports and XML tags from the old
support.ada.embed.*namespace tocx.ada.messaging.*. - Keep the runtime on the default Legacy path first.
- Move to the Messaging runtime later, as a separate, deliberate step.
This gives you a package upgrade with no end-user-visible conversation change on day one.
Side-by-side mapping
Before / after: imports
Before / after: XML tag
Compatibility notes
- The old
support.ada.embed.*classes do not compile against the new artifact. Import renames are required. greetingis the preferred setter and XML attribute name. The older plural formsgreetingsandapp:ada_greetingsare still accepted as compatibility aliases.- Zero-argument
reset()calls compile cleanly on both the view and the dialog. Settings.Builder.sensitiveMetaFields(...)is supported at initialization time, andsetSensitiveMetaFields(...)remains available for runtime updates.- Deprecated
Map<String, String>overloads still exist for migration compatibility. UseMetaFields.Builderfor all new code.
Release checklist
Before shipping your integration or migration to production:
- Verify your real production handle launches successfully
- Test the exact surface you ship (embedded view, activity, or dialog)
- Confirm your logging or analytics layer still receives SDK events
- Test push token registration if your app depends on it
- Test
reset()anddeleteHistory()if your app exposes those actions - Test uploads and downloads if your AI Agent uses them
- Test app background and foreground transitions, and process recreation
- Verify your consumer build uses a Kotlin 2.2-compatible Android toolchain