Kore.ai offers SDKs tailored for specific platforms to help developers quickly embed chatbot functionality into their custom applications.
With minimal coding, you can integrate the Kore.ai chat widget and enable users to interact naturally via conversational UI.
The Kore.ai Android SDK facilitates smooth communication with Kore.ai bots using WebSocket.
This repository also contains a sample application that you can modify to fit your bot configuration needs.
- A service for generating JWT tokens (used for authentication).
- Bot SDK credentials:
- Log into the Kore.ai Bots platform.
- Go to your bot project in the Bot Builder.
- Enable the Web/Mobile Client channel.
- Create or select an SDK app to get your Client ID and Client Secret.
Reference Images:

Enabling Web/Mobile Client Channel

Retrieving Client ID and Secret
- Copy
korebotandkorebotsdklibmodules into your project. - Update
settings.gradle:include ':korebot', ':korebotsdklib'
- Add dependencies in
build.gradle:implementation(project(':korebot')) { exclude module: 'support-v4' } implementation(project(':korebotsdklib')) { exclude module: 'support-v4' }
Inside your application:
SDKConfig.initialize(
botId,
botName,
clientId,
clientSecret,
identity,
jwtToken,
serverUrl,
brandingUrl,
jwtServerUrl
);Optional configurations:
// To set custom data if you required
SDKConfig.setCustomData(getCustomData());
// To set query params if you required
SDKConfig.setQueryParams(getQueryParams());
// Flag to use the Webhook instead of socket then make it "true"
SDKConfig.isWebHook(false);
// Flag to show or hide icon for the bot chat conversation
SDKConfig.setIsShowIcon(true);
// Flag to show chat conversation icon at the top the view
SDKConfig.setIsShowIconTop(true);
// Flag to show or hide time stamp of each conversation message
SDKConfig.setIsTimeStampsRequired(true);
// Flag to show or hide action bar in GenericWebviewActivity
SDKConfig.setIsShowActionBar(true);
// Flag to show or hide attachments icon in footer fragment
SDKConfiguration.OverrideKoreConfig.showAttachment = true;
// Flag to show or hide Speech to text(ASR) icon in footer fragment
SDKConfiguration.OverrideKoreConfig.showASRMicroPhone = true;
// Flag to show or hide Text to speech icon in footer fragment
SDKConfiguration.OverrideKoreConfig.showTextToSpeech = true;To open the chat window:
Intent intent = new Intent(getApplicationContext(), NewBotChatActivity.class);
Bundle bundle = new Bundle();
bundle.putBoolean(BundleUtils.SHOW_PROFILE_PIC, false);
bundle.putString(BundleUtils.BOT_NAME_INITIALS, "B");
intent.putExtras(bundle);
startActivity(intent);π Sample App with UI:
Kore.ai Android SDK Sample
- Only include the
korebotsdklibmodule in your project. - Add this to
settings.gradle:include ':korebotsdklib' - Add dependency in
build.gradle:implementation(project(':korebotsdklib')) { exclude module: 'support-v4' }
- Implement the
SocketConnectionListenerinterface. - Connect the bot:
BotClient botClient = new BotClient(this); botClient.connectAsAnonymousUser(jwt, botName, botId, this);
- Send messages:
botClient.sendMessage("Hello Bot"); botClient.sendMessage("Hello Bot", attachmentsList);
π Sample App without UI:
Headless SDK Sample
- Add the dependency:
implementation 'com.github.Koredotcom:android-kore-sdk:10.14.2' - Configure the SDK as described above.
- Launch chat window:
Intent intent = new Intent(getApplicationContext(), NewBotChatActivity.class); Bundle bundle = new Bundle(); bundle.putBoolean(BundleUtils.SHOW_PROFILE_PIC, false); bundle.putString(BundleUtils.BOT_NAME_INITIALS, "B"); intent.putExtras(bundle); startActivity(intent);
- Customize templates or fragments:
// To override existing template or add new template
SDKConfig.setCustomTemplateViewHolder("link", LinkTemplateHolder.class);
// To show your custom content fragment instead of existing
SDKConfig.addCustomContentFragment(new CustomContentFragment());
// To show your custom footer fragment instead of existing
SDKConfig.addCustomFooterFragment(new CustomFooterFragment());
// To show your custom header fragment instead of existing
SDKConfig.addCustomHeaderFragment(new CustomHeaderFragment());π See CustomTemplateInjection Guide
π See CustomFragmentInjection Guide
- Add JitPack to
project/build.gradle:maven { url 'https://www.jitpack.io' } - Add dependency in
app/build.gradle:implementation 'com.github.Koredotcom.android-kore-sdk:korebotsdklib:10.14.2' - Configure your bot as described previously.
Subscribe:
PushNotificationRegistrar registrar = new PushNotification(requestListener);
registrar.registerPushNotification(context, userId, accessToken);Unsubscribe:
registrar.unsubscribePushNotification(context, accessToken);To terminate the bot session:
botClient.disconnect();Switch to API/Webhook-based communication:
SDKConfig.isWebHook(true);Β© Kore.ai, Inc.
Licensed under the MIT License. See LICENSE file for details.