AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Packages | com.cometchat:chat-uikit-kotlin (Kotlin XML Views), com.cometchat:chat-uikit-compose (Jetpack Compose) |
| Required setup | CometChatUIKit.init() + CometChatUIKit.login() before rendering any component |
| Shared core | chatuikit-core — ViewModels, repositories, use cases, events (shared by both modules) |
| Calling | Requires separate com.cometchat:calls-sdk-android package |
Architecture
The UI Kit is a set of independent components that compose into chat layouts. A typical chat layout uses four core components:CometChatConversations— list of recent conversationsCometChatMessageHeader— toolbar with avatar, name, status, typing indicatorCometChatMessageList— scrollable message feed with reactions, receipts, threadsCometChatMessageComposer— rich input with attachments, mentions, voice notes
User or Group object. Pass it to the message components to load the chat.
Components communicate via CometChatEvents — a SharedFlow-based event bus. See Events.
Component Catalog
Conversations and Lists
| Component | Purpose | Page |
|---|---|---|
CometChatConversations | Scrollable list of recent conversations | Conversations |
CometChatUsers | Scrollable list of users | Users |
CometChatGroups | Scrollable list of groups | Groups |
CometChatGroupMembers | Scrollable list of group members | Group Members |
Messages
| Component | Purpose | Page |
|---|---|---|
CometChatMessageHeader | Toolbar with avatar, name, status, typing | Message Header |
CometChatMessageList | Message feed with reactions, receipts, threads | Message List |
CometChatMessageComposer | Rich input with attachments, mentions, voice | Message Composer |
CometChatThreadHeader | Parent message bubble and reply count | Thread Header |
Calling
| Component | Purpose | Page |
|---|---|---|
CometChatCallButtons | Voice and video call buttons | Call Buttons |
CometChatIncomingCall | Incoming call notification | Incoming Call |
CometChatOutgoingCall | Outgoing call screen | Outgoing Call |
CometChatCallLogs | Call history list | Call Logs |
Component API Pattern
All components share a consistent API surface across both modules.Setting User or Group
- Kotlin (XML Views)
- Jetpack Compose
Callbacks
- Kotlin (XML Views)
- Jetpack Compose
Data Filtering
- Kotlin (XML Views)
- Jetpack Compose
View Slots
Replace specific regions of a component’s UI. See View Slots.- Kotlin (XML Views)
- Jetpack Compose
Styles
See Component Styling.- Kotlin (XML Views)
- Jetpack Compose
XML theme attributes in
themes.xml:Events
Global inter-component communication viaCometChatEvents:
Next Steps
Core Features
Chat features included out of the box
Theming
Customize colors, fonts, and styles
Customization
Deep customization via ViewModels, styles, and view slots
Guides
Task-oriented tutorials for common patterns