The SDK has the following requirements:

  • Minimum Android version: API level 21 (Lollipop/5.0)

To get the Unified SDK working in your app, follow these steps:

  1. Add the Unified SDK dependencies
  2. Initialize the SDK
  3. Identify your users
  4. Start MessagingActivity

The snippets on this page show a simple, light-touch integration using the Support, Chat, and Answer Bot products. If you're not using one of the products, you can omit the lines that refer to that product. Each step ends with a link to further information.

Note: Zendesk has renamed our bot capabilities. Answer Bot is now Zendesk bots. For more information on this change, see this announcement.

Add the Unified SDK dependencies

Add the following to your build.gradle:

repositories {    maven { url 'https://zendesk.jfrog.io/zendesk/repo' }}dependencies {    api group: 'com.zendesk', name: 'messaging', version: '5.5.1'    api group: 'com.zendesk', name: 'support', version: '5.3.1'    api group: 'com.zendesk', name: 'answerbot', version: '3.3.1'    api group: 'com.zendesk', name: 'chat', version: '3.6.0'}

Note: messaging doesn't refer to the messaging channel, this is the name of the Classic SDK UI.

For more details, see Adding the Unified SDK.

Note: The Unified SDK has been updated to allow for migration to Zendesk SDK for the following versions:

  • Messaging: 5.3.0
  • Support: 5.1.2
  • Answerbot: 3.1.1
  • Chat: 3.3.7

The Classic SDK will require Messaging: 5.3.0 from this version onward (inclusive).

Note: The Unified SDK has been updated to use AndroidX as of the following versions:

  • Messaging: 5.0.0
  • Support: 5.0.0
  • Answerbot: 3.0.0
  • Chat: 3.0.0

Unified SDK will no longer be compatible with applications not using AndroidX from these versions onward (inclusive).

Initialize the SDK

Zendesk.INSTANCE.init(context, zendeskUrl, appId, oauthClientId);Support.INSTANCE.init(Zendesk.INSTANCE);AnswerBot.INSTANCE.init(Zendesk.INSTANCE, Support.INSTANCE);Chat.INSTANCE.init(context, chatAccountKey);

For more details, see Initializing the SDKs.

Identify your users

Zendesk.INSTANCE.setIdentity(new AnonymousIdentity());

For more details, see Identify your users.

Start MessagingActivity

Important: The AnswerBotEngine should be placed first in the list of engines. This is important, as the MessagingActivity will start the first engine in the list, and will treat any subsequent engines as potential contact options. Answer Bot can hand over to Support and Chat, but no other engine can hand over to Answer Bot.

Engine answerBotEngine = AnswerBotEngine.engine();Engine supportEngine = SupportEngine.engine();Engine chatEngine = ChatEngine.engine();
MessagingActivity.builder()    .withEngines(answerBotEngine, supportEngine, chatEngine)    .show(context);

Note: Starting with Messaging: 5.3.0, the dependency of zendesk.messaging.MessagingActivity has changed to zendesk.classic.messaging.MessagingActivity.

For more details, see Running the Answer Bot engine and Running the Support engine. For the Chat engine, please refer directly to Chat SDK v2 - Getting Started.
For information about MessagingActivity, see What does the flow of MessagingActivity look like with multiple Engines.