
I want to checkout Android Java UI Kit
Follow the steps mentioned in the
README.md
file.Kindly, click on below button to download our Android Java Chat UI Kit.Java Chat UI KitView on GithubI want to explore sample apps.
Import the app into Android Studio and follow the steps mentioned in the
README.md
file.Kindly, click on below button to download our Java Sample App.Java Sample AppView on GithubPrerequisites ⭐
Before you begin, ensure you have met the following requirements: ✅ You haveAndroid Studio
installed in your machine.
✅ You have a Android Device or Emulator
with Android Version 6.0 or above.
✅ You have read CometChat Key Concepts
Installing Android Java Chat UI Kit
Setup 🔧
To setup Android Chat UI Kit, you need to first register on CometChat Dashboard. Click here to sign up.Get your Application Keys 🔑
- Create a new app: Click Add App option available → Enter App Name & other information → Create App
- You will find
APP_ID
,AUTH_KEY
andREGION
key at the top in QuickStart section or else go to “API & Auth Keys” section and copy theAPP_ID
,API_KEY
andREGION
key from the “Auth Only API Key” tab.
Add the CometChat Dependency
Step 1 - Add the repository URL to the project levelbuild.gradle
file in the repositories block under the allprojects
section.
build.gradle
file and follow below
- Add the below line in the dependencies section.
- Add the below lines android section
Documentation
Configure CometChat SDK
Initialize CometChat 🌟
The init() method initializes the settings required for CometChat. We suggest calling the init() method on app startup, preferably in the onCreate() method of the Application class.Tip
UIKitSettings.setAuthKey(String authKey) is used to pass the Auth Key to uiKit library.
Make sure to replace
region
and appID
with your credentials in the above code snippet.Login User 👤
Once you have created the user successfully, you will need to log the user into CometChat using the login() method.- The
login()
method needs to be called only once. - Replace
AUTH_KEY
with your App Auth Key in the above code snippet
📝 Please refer to our SDK Documentation for more information on how to configure the CometChat Pro SDK and implement various features using the same.
Add UI Kit Library
To integrate the UI Kit, please follow the steps below:- Clone the UI Kit Library from the android-chat-ui-kit repository or
- Import
uikit
Module from Module Settings.( To know how to importuikit
as Module visit this link ) - If the Library is added sucessfully, it will look like mentioned in the below image.

Configure UI Kit Library
To use UI Kit you have to add Material Design support in your app as the UI Kit uses Material Design Components.- Add Material Design Dependency in build.gradle
- Make sure that your app’s theme should extend
Theme.MaterialComponents
. Follow the guide on Getting started Material Components
Theme.MaterialComponents.NoActionBar
- Theme.MaterialComponents.Light.NoActionBar
- Theme.MaterialComponents.DayNight.NoActionBar
Enable DataBindingAs the UI Kit uses DataBinding you must enable DataBinding
build.gradle
file in the app module, as shown in the following example:
ImportantWe are using File Provider for storage & file access. So you need to add your application package name in manifestPlaceholders
Launch CometChat UI

CometChatUI
class. Add the following code snippet to launch CometChatUI
.