Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8be2ea9
conversation uikit changes
hritika-cometchat Feb 10, 2026
2a1d28f
android-one-to-one-chat changes
hritika-cometchat Feb 10, 2026
120ac26
tab-based and geeting-started
hritika-cometchat Feb 10, 2026
90a42ac
basic changes in call-features
hritika-cometchat Feb 11, 2026
42c6d47
basic changes in call-features
hritika-cometchat Feb 11, 2026
59d634c
theme introduction
hritika-cometchat Feb 12, 2026
fc07eab
color-resources
hritika-cometchat Feb 12, 2026
b2ae8be
component-styling
hritika-cometchat Feb 12, 2026
ca196df
msg-bubble-styling
hritika-cometchat Feb 12, 2026
cef61ed
basic changes
hritika-cometchat Feb 16, 2026
075c37a
removed extra files.
hritika-cometchat Feb 16, 2026
71f62eb
events
hritika-cometchat Feb 16, 2026
65f8939
core-features
hritika-cometchat Feb 16, 2026
8e2ba7e
Update getting-started.mdx
swapnil-cometchat Feb 19, 2026
28aa064
Update android-conversation.mdx
swapnil-cometchat Feb 19, 2026
d46c211
Update android-one-to-one-chat.mdx
swapnil-cometchat Feb 19, 2026
0ab11e3
Update android-tab-based-chat.mdx
swapnil-cometchat Feb 20, 2026
55e1f6a
Update ai-features.mdx
swapnil-cometchat Feb 20, 2026
5d3c622
updates features
swapnil-cometchat Feb 20, 2026
4d616a8
Update call-features.mdx
swapnil-cometchat Feb 20, 2026
23cb9af
adds lines to codes
swapnil-cometchat Feb 20, 2026
15f4e75
Update component-styling.mdx
swapnil-cometchat Feb 20, 2026
0635ea6
Update message-bubble-styling.mdx
swapnil-cometchat Feb 20, 2026
588e574
Update message-bubble-styling.mdx
swapnil-cometchat Feb 20, 2026
98c6a69
Update component-styling.mdx
swapnil-cometchat Feb 20, 2026
5955c08
Update localize.mdx
swapnil-cometchat Feb 20, 2026
e12dc45
Update localize.mdx
swapnil-cometchat Feb 20, 2026
9b09de8
Update theme-introduction.mdx
swapnil-cometchat Feb 20, 2026
742515f
Update color-resources.mdx
swapnil-cometchat Feb 20, 2026
8bf3e36
Update component-styling.mdx
swapnil-cometchat Feb 20, 2026
ff8d584
Update localize.mdx
swapnil-cometchat Feb 20, 2026
498577f
Update sound-manager.mdx
swapnil-cometchat Feb 20, 2026
a8637f4
Update components-overview.mdx
swapnil-cometchat Feb 20, 2026
33420dc
Update android-conversation.mdx
swapnil-cometchat Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.DS_Store

.kiro/

# IDE files
.idea/

# Python caches
__pycache__/
*.pyc
28 changes: 14 additions & 14 deletions ui-kit/android/ai-assistant-chat-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The following code snippet exemplifies how you can seamlessly integrate the Grou

<Tabs>
<Tab title="XML">
```xml
```xml lines
<com.cometchat.chatuikit.aiassistantchathistory.CometChatAIAssistantChatHistory
android:id="@+id/cometchat_ai_assistant_chat_history"
android:layout_width="match_parent"
Expand All @@ -37,7 +37,7 @@ If you're defining the Group members within the XML code, you'll need to extract

<Tabs>
<Tab title="Java">
```java
```java lines

User user = new User();
user.setUid("userId");
Expand All @@ -50,7 +50,7 @@ binding.cometChatAiAssistantChatHistory.setUser(user);
</Tab>

<Tab title="Kotlin">
```kotlin
```kotlin lines

val user = User()
user.uid = "userId"
Expand All @@ -76,7 +76,7 @@ Function invoked when a chat history item is clicked, typically used to open an

<Tabs>
<Tab title="Java">
```java YourActivity.java
```java YourActivity.java lines

binding.cometchatAiAssistantChatHistory.setOnItemClickListener((view, position, message) -> {

Expand All @@ -86,7 +86,7 @@ binding.cometchatAiAssistantChatHistory.setOnItemClickListener((view, position,
</Tab>

<Tab title="Kotlin">
```kotlin YourActivity.kt
```kotlin YourActivity.kt lines
binding.cometchatAiAssistantChatHistory.setOnItemClickListener { view, position, message ->

}
Expand All @@ -104,7 +104,7 @@ Function executed when a user item is long-pressed, allowing additional actions

<Tabs>
<Tab title="Java">
```java YourActivity.java
```java YourActivity.java lines
binding.cometchatAiAssistantChatHistory.setOnItemLongClickListener((view, position, message) -> {

});
Expand All @@ -113,7 +113,7 @@ binding.cometchatAiAssistantChatHistory.setOnItemLongClickListener((view, positi
</Tab>

<Tab title="Kotlin">
```kotlin YourActivity.kt
```kotlin YourActivity.kt lines
binding.cometchatAiAssistantChatHistory.setOnItemLongClickListener { view, position, message ->

}
Expand All @@ -131,7 +131,7 @@ Function triggered when the new chat button is clicked, typically used to start

<Tabs>
<Tab title="Java">
```java YourActivity.java
```java YourActivity.java lines
binding.cometchatAiAssistantChatHistory.setOnNewChatClickListener(() -> {

});
Expand All @@ -140,7 +140,7 @@ binding.cometchatAiAssistantChatHistory.setOnNewChatClickListener(() -> {
</Tab>

<Tab title="Kotlin">
```kotlin YourActivity.kt
```kotlin YourActivity.kt lines
binding.cometchatAiAssistantChatHistory.setOnNewChatClickListener {

}
Expand All @@ -158,7 +158,7 @@ Function activated when the close button is clicked, usually to exit the chat hi

<Tabs>
<Tab title="Java">
```java YourActivity.java
```java YourActivity.java lines
binding.cometchatAiAssistantChatHistory.setOnCloseClickListener(() -> {

});
Expand All @@ -167,7 +167,7 @@ binding.cometchatAiAssistantChatHistory.setOnCloseClickListener(() -> {
</Tab>

<Tab title="Kotlin">
```kotlin YourActivity.kt
```kotlin YourActivity.kt lines
binding.cometchatAiAssistantChatHistory.setOnCloseClickListener {

}
Expand All @@ -189,7 +189,7 @@ Using Style you can customize the look and feel of the component in your app, Th
<img src="/images/android-ai-assistant-chat-history-style.png" />
</Frame>

```xml themes.xml
```xml themes.xml lines
<style name="CustomAIAssistantChatHistoryStyle">
<item name="cometChatAIAssistantChatHistoryBackgroundColor">#FFFAF6</item>
<item name="cometChatAIAssistantChatHistoryHeaderBackgroundColor">#FFFAF6</item>
Expand All @@ -213,14 +213,14 @@ Using Style you can customize the look and feel of the component in your app, Th

<Tabs>
<Tab title="Java">
```java
```java lines
binding.cometchatAiAssistantChatHistory.setStyle(R.style.CustomAIAssistantChatHistoryStyle);
```

</Tab>

<Tab title="Kotlin">
```kotlin
```kotlin lines
binding.cometchatAiAssistantChatHistory.setStyle(R.style.CustomAIAssistantChatHistoryStyle);
```

Expand Down
12 changes: 6 additions & 6 deletions ui-kit/android/ai-features.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: "AI"
title: "Smart Chat Features"
---

## Overview

CometChat's AI capabilities greatly enhance user interaction and engagement in your application. Let's understand how the Android UI Kit achieves these features.
CometChat's AI capabilities greatly enhance user interaction and engagement in your application. Here's how the Android UI Kit integrates these features.

<Frame>
<img src="/images/dc468902-AI_Overview-0c7eccf3adcb1327d6a428bb2201419e.png" />
</Frame>

## Conversation Starters
## Conversation Starter

When a user initiates a new chat, the UI kit displays a list of suggested opening lines that users can select, making it easier for them to start a conversation. These suggestions are powered by CometChat's AI, which predicts contextually relevant conversation starters.
When a user initiates a new chat, the UI kit displays a list of suggested opening lines that users can select, making it easier for them to start a conversation. These suggestions are powered by CometChat's AI, which predicts contextually relevant conversation starter options.

For a comprehensive understanding and guide on implementing and using the Conversation Starters, refer to our specific guide on the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter).
For a comprehensive understanding and guide on implementing and using the Conversation Starter, refer to our specific guide on the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter).

Once you have successfully activated the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter) from your CometChat Dashboard, the feature will automatically be incorporated into the [MessageList](/ui-kit/android/message-list) Component of UI Kits.

Expand All @@ -40,7 +40,7 @@ The Conversation Summary feature provides concise summaries of long conversation

For a comprehensive understanding and guide on implementing and using the Conversation Summary, refer to our specific guide on the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary).

Once you have successfully activated the [Smart Replies](/fundamentals/ai-user-copilot/smart-replies) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/android/message-composer) Component of UI Kits.
Once you have successfully activated the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/android/message-composer) Component of UI Kits.

<Frame>
<img src="/images/25921821-Conversation_Summary-5b64b3eb0655bc79903ca520d40a1e15.png" />
Expand Down
72 changes: 46 additions & 26 deletions ui-kit/android/android-conversation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: "Building A Conversation List + Message View"
sidebarTitle: "Conversation List + Message View"
---

The **Conversation List + Message View** layout offers a seamless **two-panel chat interface**, commonly used in modern messaging applications like **WhatsApp Web, Slack, and Microsoft Teams**.
The **Conversation List + Message View** layout provides a **sequential navigation pattern** for Android messaging applications, similar to **WhatsApp, Slack, and Telegram**.

This design enables users to switch between conversations effortlessly while keeping the chat window open, ensuring a **smooth, real-time messaging experience**.
This design allows users to view their conversation list and tap on any conversation to open a full-screen message view, providing a **familiar mobile real-time messaging experience**.

***

Expand All @@ -17,21 +17,31 @@ This design enables users to switch between conversations effortlessly while kee

### **Key Components**

1. **Chat Header** – Displays user/group name, profile image, and status.
2. **Message List** – Shows chat history and new messages.
3. **Message Composer** – Allows users to send messages, media, and reactions.
1. **Message Header** – Displays user/group name, avatar, and status.
2. **Message List** – Shows chat history with real-time message updates.
3. **Message Composer** – Provides input field for sending text messages, media, and attachments.

***

## **Step-by-Step Guide**

### **Navigation Flow**

This implementation follows Android's standard Activity navigation pattern:

1. **ConversationActivity** displays the list of conversations
2. User taps a conversation item
3. **MessageActivity** launches with the selected user/group data passed via Intent extras

***

### **Step 1: Set Up Conversation Activity**
Create an Activity - `ConversationActivity.kt` to manage and display the chat UI.
Create a new Activity called `ConversationActivity` to display the list of conversations.

#### **Layout**
Define the layout using the `CometChatConversations` component:
Define the layout using the `CometChatConversations` component in `activity_conversations.xml`:

```xml activity_conversations.xml
```xml activity_conversations.xml lines
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -54,12 +64,12 @@ Define the layout using the `CometChatConversations` component:

#### **Activity**

Initialize and handle conversation clicks:
Initialize the `CometChatConversations` component and handle conversation item clicks to navigate to the message screen:

<Tabs>
<Tab title="Kotlin">

```kotlin ConversationActivity.kt
```kotlin ConversationActivity.kt lines
import android.content.Intent
import android.os.Bundle

Expand Down Expand Up @@ -117,7 +127,7 @@ class ConversationActivity : AppCompatActivity() {

<Tab title="Java">

```java ConversationActivity.java
```java ConversationActivity.java lines
import android.content.Intent;
import android.os.Bundle;

Expand Down Expand Up @@ -189,11 +199,13 @@ This is necessary to properly manage the **UI Kit's lifecycle events**.
***

### **Step 2: Set Up Message Activity**
Create an Activity - `MessageActivity.kt` to manage and display the chat UI.
Create a new Activity - `MessageActivity` to display the chat interface.

#### **Layout**

```xml activity_message.xml
Define the layout with `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` in `activity_message.xml`:

```xml activity_message.xml lines
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand Down Expand Up @@ -236,11 +248,11 @@ Create an Activity - `MessageActivity.kt` to manage and display the chat UI.

#### **Activity**

Use the user/group passed from the conversation click:
Retrieve the user/group ID from the Intent extras and configure the message components:

<Tabs>
<Tab title="Kotlin">
```kotlin MessageActivity.kt
```kotlin MessageActivity.kt lines
import android.os.Bundle
import android.util.Log
import android.widget.Toast
Expand Down Expand Up @@ -344,7 +356,7 @@ class MessageActivity : AppCompatActivity() {
</Tab>

<Tab title="Java">
```java MessageActivity.java
```java MessageActivity.java lines
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
Expand Down Expand Up @@ -458,11 +470,11 @@ public class MessageActivity extends AppCompatActivity {

### **Step 3: Update MainActivity**

Update the `MainActivity` to navigate to the `MessageActivity`:
Update your `MainActivity` to launch `ConversationActivity` after successful login:

<Tabs>
<Tab title="Kotlin">
```kotlin MainActivity.kt
```kotlin MainActivity.kt highlight={15-17, 19, 48-49} lines
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
Expand All @@ -481,6 +493,8 @@ class MainActivity : ComponentActivity() {
private val region = "REGION" // Replace with your App Region
private val authKey = "AUTH_KEY" // Replace with your Auth Key or leave blank if you are authenticating using Auth Token

private val uid = "cometchat-uid-1" // Replace with the UID of the user you want to log in

private val uiKitSettings = UIKitSettings.UIKitSettingsBuilder()
.setRegion(region)
.setAppId(appID)
Expand All @@ -505,7 +519,7 @@ class MainActivity : ComponentActivity() {
}

private fun loginUser() {
CometChatUIKit.login("cometchat-uid-1", object : CometChat.CallbackListener<User>() {
CometChatUIKit.login(uid, object : CometChat.CallbackListener<User>() {
override fun onSuccess(user: User) {

// Launch Conversation List + Message View (Split-Screen Style)
Expand All @@ -524,7 +538,7 @@ class MainActivity : ComponentActivity() {
</Tab>

<Tab title="Java">
```java MainActivity.java
```java MainActivity.java highlight={15-17, 51-52} lines
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
Expand Down Expand Up @@ -595,15 +609,21 @@ public class MainActivity extends ComponentActivity {

***

## **Running the Project**
## **Running the Application**

Once the components are configured, build and run the app:
Once you've completed the setup, build and run your Android application:

```sh
gradle build
```

Ensure you've added the necessary permissions and initialized CometChat in your `Application` class.
<Note>
**Required Permissions**

Ensure you've added the necessary permissions in your `AndroidManifest.xml`:

```xml lines
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```
</Note>

***

Expand Down
Loading