Getting Started

The SDK has the following requirements:

  • Minimum Android version: API level 16 (Jelly Bean / 4.1)

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.

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.0.0'
    api group: 'com.zendesk', name: 'support', version: '5.0.0'
    api group: 'com.zendesk', name: 'answerbot', version: '3.0.0'
    api group: 'com.zendesk', name: 'chat', version: '3.0.0'
}

For more details, see Adding the Unified SDK.

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 version onwards (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

Engine answerBotEngine = AnswerBotEngine.engine();
Engine supportEngine = SupportEngine.engine();
Engine chatEngine = ChatEngine.engine();

MessagingActivity.builder()
    .withEngines(answerBotEngine, supportEngine, chatEngine)
    .show(context);

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.