With the Android SDK, you can customize the behavior of your chat bot by configuring initial chat settings, either in XML or programmatically using the AdaEmbedView.Settings class.
The Ada Android SDK supports the following settings.
app:ada_cluster="ca" or .cluster("ca")
Specifies the Kubernetes cluster your AI Agent runs on.
Set this only if your Agent is hosted on a non-default cluster (e.g., us2, maple, eu, att).
If the Agent is on the default us cluster, leave this unset.
app:ada_greeting="5c59aaabd8269e0339979014" or .greeting("5c59aaabd8269e0339979014")
Use to customize the greeting messages that new chatters see. This is useful for setting view-specific greetings across your app. The greeting should correspond to the ID of the Answer you would like to use, which you can find in the URL of the corresponding Answer in the dashboard.
Example

This setting is only applicable if you’re using a scripted bot.
app:ada_handle="my-bot" or adaSettings = AdaEmbedView.Settings.Builder("my-bot")
The handle for your bot. This is a required field.
app:ada_language="en" or .language("en")
Takes in a language code to programatically set the bot language. You must first turn languages on in your Ada dashboard.
Language codes use the ISO 639-1 language format.
Use metaFields to pass information about a chatter to Ada. This can be useful for tracking information about your customers, as well as personalizing their experience. For example, you may wish to track the phone_number and name for conversation attribution. (See Variables for more information.)
Once set, you can access this information:
You can also set metaFields using XML. For this, you need to create a JSON file in the res/raw directory, and set the reference to the view declaration.
To change these values after bot setup, use the setMetaFields action.
Use this parameter to pass sensitive meta information about a chatter. This works like metafields but the values are not stored in the database and will be deleted after 24 hours. To change these values after bot setup, use the setSensitiveMetafields action.
Use the zdChatterAuthCallback to request a JWT token from your API, then pass it to Ada. This creates shared trust between Ada and Zendesk, and in turn allows for verifiable chatter identity.
To implement, define zdChatterAuthCallback on adaView or adaDialog, as in the following examples.
Using AdaEmbedView
Using AdaEmbedDialog
zdChatterAuthCallback is available only for Zendesk Chat. It is not available for Zendesk Messaging.
The Android SDK stores session state — including the chatter token and any active Zendesk Messaging handoff context — in the WebView’s localStorage.
On Android, WebView localStorage is not guaranteed to survive a force-quit. If a user force-closes the app during an active session or live agent handoff, their conversation state will be lost when they reopen the app.
If your app requires session continuity across app restarts, you will need to implement your own native storage management. The current SDK does not persist session state using platform-native storage such as SharedPreferences.
To implement this yourself, see the Android developer documentation on saving key-value data with SharedPreferences.
Use the actions below in conjunction with settings to customize the behavior of your bot in an Android app.
Note that the following actions apply to AdaEmbedView (see Launch Ada). To call actions in AdaEmbedActivity or AdaEmbedDialog, refer to these instructions.
Deletes the chatter used to fetch conversation logs for a chatter from storage. When a user opens a new chat window, a new chatter is generated.
To do this you also need to call deleteHistory() in your AdaEmbedView instance.
Creates a new chatter and refreshes the chat window. To do this, call reset() in your AdaEmbedView instance.
Reset can also take three optional parameters to be changed for the new chatter: language, metaFields, and greeting:
setLanguage(languageCode: string)
Changes the language in chat programatically. Use this action, rather than the language setting, to change the chat language without clearing the chat history. Language codes must use a lowercase, two-letter code, in ISO 639-1 language format. For example, en, fr, ca, ar, and so on.
Before using setLanguage:
You must turn languages on in your Ada dashboard.
The chat window must be opened at least once.
The Android SDK allows you to change your metaFields while the chat frame is open. To do this, call setMetaFields() in your AdaEmbedView instance, and pass your new metaFields as an argument:
The Android SDK allows you to change your sensitiveMetaFields while the chat frame is open. To do this, call setSensitiveMetaFields() in your AdaEmbedView instance and pass your new sensitiveMetaFields as an argument:
adaView.triggerAnswer(answerId: string)
Triggers an answer in chat. Include the Answer ID, which you can find in the URL of the corresponding Answer in the dashboard.
Example

The chat window must be opened at least once before this method can be used.
This action is only applicable if you’re using a scripted bot.
To call actions in the AdaEmbedActivity, you must first create your own activity that inherits AdaEmbedActivity. Then using the getAdaView() you can obtain the AdaEmbedView instance.
To call actions in the AdaEmbedDialog, you can obtain AdaEmbedDialog instance from FragmentManager: