AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | com.cometchat:chat-uikit-android |
| Components | CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer |
| Layout | Single chat window — no conversation list |
| Prerequisite | Complete Integration Steps 1–4 first |
| Pattern | Support chat, embedded widgets, focused messaging |
What You’re Building

- Message header — displays user/group name, avatar, and status
- Message list — real-time chat history with scrolling
- Message composer — text input with media and attachments
Step 1: Set Up Message Activity
Create an Activity -MessageActivity to display the full-screen chat interface.
Layout
Define the layout withCometChatMessageHeader, CometChatMessageList, and CometChatMessageComposer in activity_message.xml:
activity_message.xml
Activity
Retrieve the user or group ID from the Intent extras and configure the message components:- Kotlin
- Java
MessageActivity.kt
Step 2: Launch MessageActivity from Your App
Update yourMainActivity (or any other Activity) to launch MessageActivity with the appropriate user or group ID:
Passing Data via IntentYou can pass either:
uid(String) - for one-to-one chatsguid(String) - for group chats
MessageActivity will automatically detect which type of chat to display based on the Intent extras.- Kotlin
- Java
MainActivity.kt
Running the Project
Once you’ve completed the setup, build and run the app:Required PermissionsEnsure you’ve added the necessary permissions in your
AndroidManifest.xml and initialized CometChat in your Application class.
:Next Steps
Components Overview
Explore all available UI Kit components and their customization options
Theming
Customize colors, fonts, and styles to match your brand
Integration
Back to the main setup guide
Feature Guides
Add capabilities like threaded messages, blocking, and group management