AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | com.cometchat:chat-uikit-android v5.x |
| Init | CometChatUIKit.init(context, UIKitSettings, callback) — must resolve before login() |
| Login | CometChatUIKit.login("UID", callback) — must resolve before rendering components |
| Order | init() → login() → render. Breaking this order = blank screen |
| Auth Key | Dev/testing only. Use Auth Token in production |
| Theme | Set CometChatTheme.DayNight as parent theme in themes.xml |
| Calling | Optional. Add com.cometchat:calls-sdk-android to enable voice/video |
| Min SDK | Android 7.0 (API 24) |
| AI Skills | npx @cometchat/skills add — GitHub |

Integrate with AI Coding Agents
Skip the manual steps — use CometChat Skills to integrate via your AI coding agent. Your agent has a short conversation with you to understand your project and chat requirements, then writes production-grade integration code tailored to the files you already have.--ide <name> to target a specific IDE (e.g. --ide cursor), or --ide all for all supported IDEs.
Then in your IDE:
local.properties and accessed via BuildConfig.
After the first integration, re-run /cometchat to access the iteration menu: theme presets, 40+ features, component customization, production auth, user management, and diagnostics.
Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and 30+ more agents.
Prerequisites
You need three things from the CometChat Dashboard:| Credential | Where to find it |
|---|---|
| App ID | Dashboard → Your App → Credentials |
| Auth Key | Dashboard → Your App → Credentials |
| Region | Dashboard → Your App → Credentials (e.g. us, eu, in) |
- Android Studio installed
- An Android emulator or physical device running Android 7.0 (API 24) or higher
- Java 8 or higher
- Gradle plugin 4.0.1 or later
Step 1 — Create an Android Project
- Open Android Studio and start a new project.
- Choose Empty Activity as the project template.
- Enter a project name and choose Java or Kotlin as the language.
- Set minimum API level to 24 or higher.
Step 2 — Install Dependencies
Add the CometChat repository and dependencies to your Gradle configuration.Add the CometChat Repository
Add the CometChat Maven repository to your project-levelsettings.gradle or settings.gradle.kts file.
- Kotlin
- Groovy
settings.gradle.kts
Add the CometChat Dependency
- Version Catalog (libs.versions.toml)
- Gradle (build.gradle)
Inside Under the Now, in your app-level
libs.versions.toml, add the CometChat Chat UI Kit version under the [versions] section:libs.versions.toml
[libraries] section, define the library and reference the version:libs.versions.toml
build.gradle.kts file, add the dependency using libs from Version Catalogs:build.gradle.kts
Add AndroidX Support
The Jetifier tool helps migrate legacy support libraries to AndroidX. Opengradle.properties and verify this line is present:
gradle.properties
Step 3 — Initialize and Login
To authenticate a user, you need a UID. You can either create users on the CometChat Dashboard, via the SDK method, or through the REST API. For development, use one of the pre-created test UIDs:cometchat-uid-1 · cometchat-uid-2 · cometchat-uid-3 · cometchat-uid-4 · cometchat-uid-5
- Kotlin
- Java
MainActivity.kt
Step 4 — Set Up Global Theme
To customize component styling across your application, set up the CometChat Theme. Use theCometChatTheme.DayNight style, which is built on Theme.MaterialComponents.DayNight.NoActionBar.
themes.xml
AndroidManifest.xml
Step 5 — Choose a Chat Experience
Integrate a conversation view that suits your app’s UX. Each option below includes a description and a step-by-step guide.Conversation List + Message View
Single-screen layout for mobile — tap a conversation to open the message view. Handles one-to-one and group conversations with real-time updates and session persistence.
Build Conversation List + Message View
Step-by-step guide to build this layout
One-to-One / Group Chat
Single chat window — no sidebar. Loads a specific user or group chat directly. Ideal for support chat, direct messages, or notification-driven flows.
Build One-to-One / Group Chat
Step-by-step guide to build this layout
Tab-Based Chat
Bottom navigation with tabs for Chats, Calls, Users, and Settings. Mobile-first, modular, and extensible for multi-feature apps.
Build Tab-Based Chat
Step-by-step guide to build this layout
Build Your Own Chat Experience
Need full control over the UI? Use individual components, customize themes, and wire up your own layouts.Sample App
Working reference app to compare against
Components
All prebuilt UI elements with customization options
Core Features
Messaging, real-time updates, and other capabilities
Theming
Colors, fonts, dark mode, and custom styling
Build Your Own UI
Skip the UI Kit entirely and build on the raw SDK
Next Steps
Components Overview
Browse all prebuilt UI components
Theming
Customize colors, fonts, and styles
Core Features
Chat features included out of the box
Troubleshooting
Common issues and fixes