Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,7 @@
"ui-kit/android/component-styling",
"ui-kit/android/message-bubble-styling",
"ui-kit/android/localize",
"ui-kit/android/rtl-support",
"ui-kit/android/sound-manager"
]
},
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/android/ai-assistant-chat-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
},
"events": [],
"sdkListeners": []

Check warning on line 43 in ui-kit/android/ai-assistant-chat-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/ai-assistant-chat-history.mdx#L43

Did you really mean 'sdkListeners'?
}
```

Expand All @@ -67,7 +67,7 @@
<Tab title="Kotlin (XML Views)">
```kotlin lines
val user = User()
user.uid = "userId"

Check warning on line 70 in ui-kit/android/ai-assistant-chat-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/ai-assistant-chat-history.mdx#L70

Did you really mean 'userId'?
user.name = "User Name"
user.role = "@agentic" // User role must be @agentic to use AI Assistant features

Expand Down Expand Up @@ -314,6 +314,7 @@
| `setUser` | Sets the user whose chat histories with the AI assistant need to be fetched. This is a required property for the component to function. The user's role must be `@agentic`. | `.setUser(user);` |
| `setErrorStateVisibility` | Toggles the visibility of the error state of the component | `.setErrorStateVisibility(View.GONE);` |
| `setEmptyStateVisibility` | Toggles the visibility of the empty state of the component | `.setEmptyStateVisibility(View.GONE);` |
| `setCometChatLayoutDirection` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) | `.setCometChatLayoutDirection(CometChatLayoutDirection.RTL);` |

- **Verify**: After calling `setUser(user)`, confirm the component fetches and displays the AI assistant chat histories for that user. After calling a visibility method, confirm the corresponding UI state is shown or hidden.

Expand All @@ -339,6 +340,35 @@
| Error state visibility | Activity/Fragment | `setErrorStateVisibility(int)` | `.setErrorStateVisibility(View.GONE);` |
| Empty state visibility | Activity/Fragment | `setEmptyStateVisibility(int)` | `.setEmptyStateVisibility(View.GONE);` |

## Layout Direction

`CometChatAIAssistantChatHistory` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatAIAssistantChatHistory` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.aiassistantchathistory.ui.CometChatAIAssistantChatHistory
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
chatHistory.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatAIAssistantChatHistory(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 364 in ui-kit/android/ai-assistant-chat-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/ai-assistant-chat-history.mdx#L364

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/android/call-buttons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

`CometChatCallButtons` renders voice and video call buttons and initiates calls for the bound `User` or `Group`. Place it in a `CometChatMessageHeader` or anywhere a call action is needed.

For a user, a tap calls `CometChatCalls.initiateCall` through the Calls SDK (the backend rings the callee by push) and opens the [Outgoing Call](/ui-kit/android/outgoing-call) screen. For a group, it sends a meeting message to the group and opens the [Ongoing Call](/ui-kit/android/ongoing-call) screen as a conference; members join by tapping the message. The Chat SDK's calling APIs are not used.

Check warning on line 8 in ui-kit/android/call-buttons.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-buttons.mdx#L8

Did you really mean 'callee'?

---

Expand Down Expand Up @@ -250,6 +250,7 @@
| `setOnError { }` | `onError = { }` | Error callback |
| `setVoiceCallButtonVisibility(View.GONE)` | `hideVoiceCallButton = true` | Toggle voice call button |
| `setVideoCallButtonVisibility(View.GONE)` | `hideVideoCallButton = true` | Toggle video call button |
| `setCometChatLayoutDirection(CometChatLayoutDirection.RTL)` | `layoutDirection = CometChatLayoutDirection.RTL` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) |

---

Expand Down Expand Up @@ -326,6 +327,35 @@

---

## Layout Direction

`CometChatCallButtons` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatCallButtons` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.callbuttons.CometChatCallButtons
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
callButtons.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatCallButtons(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 351 in ui-kit/android/call-buttons.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-buttons.mdx#L351

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/android/call-logs.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Call Logs"
description: "Scrollable list of call logs for the logged-in user with caller names, avatars, call status, and timestamps."

Check warning on line 3 in ui-kit/android/call-logs.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-logs.mdx#L3

Did you really mean 'Scrollable'?
---

`CometChatCallLogs` renders a scrollable list of call logs for the logged-in user with caller names, avatars, call status indicators, and timestamps. The call icon on a row calls that user back through the Calls SDK and opens the [Outgoing Call](/ui-kit/android/outgoing-call) screen. The list refreshes itself when a call starts or ends.

Check warning on line 6 in ui-kit/android/call-logs.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-logs.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/7fe2a6db-call_logs-7b4f502153923374898f3887441ab8d2.png" />
Expand All @@ -20,7 +20,7 @@

| Calls artifact | `uiKit.enableCalling` | Result |
|---|---|---|
| absent | anything | Empty list; logcat warns `Calls SDK is not on the classpath; skipping call-log fetch` |

Check warning on line 23 in ui-kit/android/call-logs.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-logs.mdx#L23

Did you really mean 'logcat'?
| present | `false` | Error state; the Calls SDK reports `Please call the CometChatCalls.init() method …` |
| present | `true` | renders (empty/error state when there are no logs) |

Expand Down Expand Up @@ -393,6 +393,7 @@
| `setSeparatorVisibility(View.GONE)` | `hideSeparator = true` | Toggle list separators |
| `setTitle("Call History")` | `title = "Call History"` | Custom toolbar title |
| `setOnCallTypeIconClick { }` | `onCallIconClick = { }` | Override the call-back on the row's call icon |
| `setCometChatLayoutDirection(CometChatLayoutDirection.RTL)` | `layoutDirection = CometChatLayoutDirection.RTL` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) |

### Call status

Expand Down Expand Up @@ -912,6 +913,35 @@

---

## Layout Direction

`CometChatCallLogs` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatCallLogs` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.calllogs.ui.CometChatCallLogs
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
callLogs.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatCallLogs(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 937 in ui-kit/android/call-logs.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/call-logs.mdx#L937

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
32 changes: 31 additions & 1 deletion ui-kit/android/conversations.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Conversations"
description: "Scrollable list of recent one-on-one and group conversations for the logged-in user."

Check warning on line 3 in ui-kit/android/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/conversations.mdx#L3

Did you really mean 'Scrollable'?
---

`CometChatConversations` renders a scrollable list of recent conversations with real-time updates for new messages, typing indicators, read receipts, and user presence.

Check warning on line 6 in ui-kit/android/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/conversations.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/f2c77c5b-Conversation-ac41cc6650fbb941c64f389aee910dbc.png" />
Expand Down Expand Up @@ -432,13 +432,13 @@

A pinned conversation sits at the top of the list and holds that position even as new messages arrive in other chats. The pin is **private to the logged-in user** — nobody else sees it — and it syncs to that user's other devices.

When the feature is enabled for your app, the long-press menu includes **Pin conversation** / **Unpin conversation** with no wiring needed: pinning applies immediately with a toast, unpinning asks for confirmation first, and a pinned row shows a pin indicator next to its timestamp.
When the feature is enabled for your app, the long-press menu includes **Pin conversation** / **Unpin conversation** with no wiring needed: pinning applies immediately with a snackbar, unpinning asks for confirmation first, and a pinned row shows a pin indicator next to its timestamp.

Check warning on line 435 in ui-kit/android/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/conversations.mdx#L435

Did you really mean 'snackbar'?

<Warning>
**Pin Conversation must be enabled for your app** through the `features.ux.conversations.pinned.enabled` app setting in the CometChat Dashboard. Until it is, the option never renders, and a direct SDK call rejects with `ERR_FEATURE_NOT_ACCESSIBLE`. The UI Kit reads that setting itself at login and on every reconnect — there is no app code to write. Read it yourself with `CometChatUIKit.isPinConversationEnabled()` when you need to gate your own entry point.
</Warning>

`setPinConversationOptionVisibility(View.GONE)` (Compose: `hidePinOption = true`) hides the option on one particular list. It is **ANDed** with that app setting, so the option renders only when both allow it.

Check warning on line 441 in ui-kit/android/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/conversations.mdx#L441

Did you really mean 'ANDed'?

<Tabs>
<Tab title="Kotlin (XML Views)">
Expand Down Expand Up @@ -487,6 +487,7 @@
| `setTitle("Chats")` | `title = "Chats"` | Custom toolbar title |
| `setSearchPlaceholderText("Search...")` | `searchPlaceholderText = "Search..."` | Search placeholder |
| `setPinConversationOptionVisibility(View.GONE)` | `hidePinOption = true` | Hide the built-in Pin/Unpin conversation option |
| `setCometChatLayoutDirection(CometChatLayoutDirection.RTL)` | `layoutDirection = CometChatLayoutDirection.RTL` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) |

---

Expand Down Expand Up @@ -990,6 +991,35 @@

---

## Layout Direction

`CometChatConversations` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatConversations` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.conversations.ui.CometChatConversations
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
conversations.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatConversations(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 1015 in ui-kit/android/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/conversations.mdx#L1015

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/android/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

| Field | Value |
| --- | --- |
| Packages | `com.cometchat:chatuikit-kotlin-android` (Kotlin XML Views), `com.cometchat:chatuikit-compose-android` (Jetpack Compose) |

Check warning on line 10 in ui-kit/android/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/core-features.mdx#L10

Did you really mean 'Jetpack'?
| Required setup | `CometChatUIKit.init()` then `CometChatUIKit.login()` — must complete before rendering any component |
| Core features | Instant Messaging, Media Sharing, Read Receipts, Mark as Unread, Typing Indicator, User Presence, Reactions, Mentions, Rich Text Formatting, Quoted Reply, Search, Threaded Conversations, Moderation, Report Message, Group Chat |
| Key components | `CometChatConversations`, `CometChatMessageList`, `CometChatMessageComposer`, `CometChatMessageHeader`, `CometChatUsers`, `CometChatGroups`, `CometChatGroupMembers`, `CometChatMessageInformation`, `CometChatThreadHeader` |
Expand Down Expand Up @@ -160,7 +160,7 @@
| `features.ux.messages.saved.enabled` | Whether the save options and screen render at all |
| `features.ux.messages.saved.limit` | Saved messages per user |

The UI Kit reads the feature flags at login, so no wiring is needed to show or hide the options. When a user reaches a cap, the kit shows a toast naming the limit — no extra handling required. For a full walkthrough, see the [Pin & Save Messages guide](/ui-kit/android/guide-pin-and-save-messages).
The UI Kit reads the feature flags at login, so no wiring is needed to show or hide the options. When a user reaches a cap, the kit shows a snackbar naming the limit — no extra handling required. For a full walkthrough, see the [Pin & Save Messages guide](/ui-kit/android/guide-pin-and-save-messages).

Check warning on line 163 in ui-kit/android/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/core-features.mdx#L163

Did you really mean 'snackbar'?

Check warning on line 163 in ui-kit/android/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/core-features.mdx#L163

Did you really mean 'walkthrough'?

## Pin Conversations

Expand Down
6 changes: 6 additions & 0 deletions ui-kit/android/customization-view-slots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@

View slots are available on all list-based components:

| Component | ViewHolderListener (Kotlin XML) | Composable Lambdas (Compose) |

Check warning on line 248 in ui-kit/android/customization-view-slots.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/customization-view-slots.mdx#L248

Did you really mean 'Composable'?
| --- | --- | --- |
| `CometChatConversations` | `ConversationsViewHolderListener` | `(Conversation, TypingIndicator?) -> Unit` |
| `CometChatUsers` | `UsersViewHolderListener` | `(User) -> Unit` |
Expand All @@ -260,6 +260,12 @@

---

## View Slots in RTL

Views you pass into a slot are placed inside the component's layout direction. Use start/end values (`paddingStart`, `layout_marginEnd`, `Modifier.padding(start = …)`, `Alignment.Start`) so they mirror with the rest of the component in RTL. See [Custom Views in RTL](/ui-kit/android/rtl-support#custom-views-in-rtl).

---

## Related

- [Styles](/ui-kit/android/customization-styles) — Customize visual appearance without replacing views.
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/android/group-members.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Group Members"
description: "Scrollable list of all members in a group with search, avatars, names, scope badges, and online/offline status."

Check warning on line 3 in ui-kit/android/group-members.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/group-members.mdx#L3

Did you really mean 'Scrollable'?
---

`CometChatGroupMembers` renders a scrollable list of all members in a specific group with real-time updates for membership changes, search, avatars, scope badges, and online/offline status indicators. Requires a `Group` object to load data.

Check warning on line 6 in ui-kit/android/group-members.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/group-members.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/c316bb0a-group_members-9849dc973b6addaffc0990af38520294.png" />
Expand Down Expand Up @@ -423,6 +423,7 @@
| `setSelectionMode(MULTIPLE)` | `selectionMode = MULTIPLE` | Enable selection mode |
| `setTitle("Members")` | `title = "Members"` | Custom toolbar title |
| `setSearchPlaceholderText("Find...")` | `searchPlaceholderText = "Find..."` | Search placeholder |
| `setCometChatLayoutDirection(CometChatLayoutDirection.RTL)` | `layoutDirection = CometChatLayoutDirection.RTL` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) |

---

Expand Down Expand Up @@ -976,6 +977,35 @@

---

## Layout Direction

`CometChatGroupMembers` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatGroupMembers` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.groupmembers.ui.CometChatGroupMembers
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
groupMembers.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatGroupMembers(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 1001 in ui-kit/android/group-members.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/group-members.mdx#L1001

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/android/groups.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Groups"
description: "Scrollable list of all available groups with search, avatars, names, and group type indicators."

Check warning on line 3 in ui-kit/android/groups.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/groups.mdx#L3

Did you really mean 'Scrollable'?
---

`CometChatGroups` renders a scrollable list of all available groups with real-time updates for membership changes, search, avatars, and group type indicators (public, private, password-protected).

Check warning on line 6 in ui-kit/android/groups.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/groups.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/8f0fe074-groups-876f11ccd26289efd7bd12d29a1bc205.png" />
Expand Down Expand Up @@ -412,6 +412,7 @@
| `setSelectionMode(MULTIPLE)` | `selectionMode = MULTIPLE` | Enable selection mode |
| `setTitle("My Groups")` | `title = "My Groups"` | Custom toolbar title |
| `setSearchPlaceholderText("Find...")` | `searchPlaceholderText = "Find..."` | Search placeholder |
| `setCometChatLayoutDirection(CometChatLayoutDirection.RTL)` | `layoutDirection = CometChatLayoutDirection.RTL` | Layout direction for this component and everything inside it: `LTR` or `RTL`. Overrides the global setting; unset inherits it. See [RTL Support](/ui-kit/android/rtl-support) |

---

Expand Down Expand Up @@ -956,6 +957,35 @@

---

## Layout Direction

`CometChatGroups` follows the UI Kit's layout direction. Set it for this component only to override the global setting for `CometChatGroups` and everything inside it. See [RTL Support](/ui-kit/android/rtl-support).

<Tabs>
<Tab title="Kotlin (XML Views)">
```xml
<com.cometchat.uikit.kotlin.presentation.groups.ui.CometChatGroups
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cometchatLayoutDirection="rtl" />
```

```kotlin
groups.setCometChatLayoutDirection(CometChatLayoutDirection.RTL)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin
CometChatGroups(
// ...your other parameters
layoutDirection = CometChatLayoutDirection.RTL

Check warning on line 981 in ui-kit/android/groups.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/groups.mdx#L981

Did you really mean 'layoutDirection'?
)
```
</Tab>
</Tabs>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
12 changes: 6 additions & 6 deletions ui-kit/android/guide-pin-and-save-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| **Save Message** | All conversations | Only the acting user | Action-sheet option, bubble indicator, [Saved Messages](/ui-kit/android/saved-messages) screen |
| **Pin Conversation** | Conversation list | Only the acting user | Long-press option + pin indicator in [Conversations](/ui-kit/android/conversations) |

The options, confirmation dialogs, toasts and indicators are built into the UI Kit components. The only integration work is wiring the two full-screen views into your navigation.
The options, confirmation dialogs, snackbars and indicators are built into the UI Kit components. The only integration work is wiring the two full-screen views into your navigation.

Check warning on line 17 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L17

Did you really mean 'dialogs'?

Check warning on line 17 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L17

Did you really mean 'snackbars'?

## Prerequisites

Expand All @@ -29,11 +29,11 @@

## Pin & Save in the Message List

With the features enabled, [CometChatMessageList](/ui-kit/android/message-list) automatically adds **Pin message / Unpin message** and **Save message / Unsave message** to the long-press action sheet for text and media messages. The labels toggle with the message's current state.

Check warning on line 32 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L32

Did you really mean 'Unsave'?

- **Pin** permission is enforced by the **server**, not by the UI Kit: the Pin/Unpin option is shown to every participant, and a user who lacks permission gets a "you don't have permission" toast (`ERR_PERMISSION_DENIED`) when they tap it. Everyone sees pinned indicators. Build custom pin UI the same way — show the action and handle the denial, rather than trying to predict the verdict client-side.
- **Pin** permission is enforced by the **server**, not by the UI Kit: the Pin/Unpin option is shown to every participant, and a user who lacks permission gets a "you don't have permission" snackbar (`ERR_PERMISSION_DENIED`) when they tap it. Everyone sees pinned indicators. Build custom pin UI the same way — show the action and handle the denial, rather than trying to predict the verdict client-side.

Check warning on line 34 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L34

Did you really mean 'snackbar'?
- **Save** has no role gating — every user can save any message.
- **Pin** and **Save** apply immediately and show a toast (*Message pinned*, *Message saved*, …); **Unpin** and **Unsave** ask for confirmation first. If a pin or save limit is exceeded, the limit toast is generated from the server's response automatically.
- **Pin** and **Save** apply immediately and show a snackbar (*Message pinned*, *Message saved*, …); **Unpin** and **Unsave** ask for confirmation first. If a pin or save limit is exceeded, the limit snackbar is generated from the server's response automatically.

Check warning on line 36 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L36

Did you really mean 'snackbar'?

Check warning on line 36 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L36

Did you really mean 'Unsave'?

Check warning on line 36 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L36

Did you really mean 'snackbar'?
- Pinned and saved messages show **indicators in the bubble footer** (a filled pin / bookmark before the timestamp), updating live for all bubble types.

## Step 1: Open Pinned Messages from the Chat Header
Expand Down Expand Up @@ -157,11 +157,11 @@
| `features.ux.conversations.pinned.enabled` | Whether the pin/unpin conversation option renders |
| `features.ux.conversations.pinned.limit` | Pinned conversations per user (see [Conversations](/ui-kit/android/conversations#pinning-conversations)) |

When a user hits a cap, the UI Kit shows a toast explaining the limit — you don't need to handle the error yourself.
When a user hits a cap, the UI Kit shows a snackbar explaining the limit — you don't need to handle the error yourself.

Check warning on line 160 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L160

Did you really mean 'snackbar'?

### Error Codes

The built-in options turn these rejections into toasts. If you build custom pin or save UI on the SDK, handle them yourself:
The built-in options turn these rejections into snackbars. If you build custom pin or save UI on the SDK, handle them yourself:

Check warning on line 164 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L164

Did you really mean 'snackbars'?

| Code | Meaning |
| --- | --- |
Expand All @@ -177,13 +177,13 @@

## Live Updates

On the acting user's device, all surfaces stay in sync through the UI Kit event bus — pinning from the action sheet updates the bubble indicator and the Pinned Messages screen without a refetch. Delivery of message pin/save events to other participants and to the user's other devices activates once server-side real-time delivery for these features is rolled out; until then, other clients pick the change up on their next fetch. If you build custom UI, observe the `MessagePinned` / `MessageUnpinned` / `MessageSaved` / `MessageUnsaved` events; see [Events](/ui-kit/android/events).

Check warning on line 180 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L180

Did you really mean 'refetch'?

## Summary / Feature Matrix

| Capability | Built-in | Your wiring |
| --- | --- | --- |
| Action-sheet options, confirm dialogs, toasts | ✅ | — |
| Action-sheet options, confirm dialogs, snackbars | ✅ | — |

Check warning on line 186 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L186

Did you really mean 'dialogs'?

Check warning on line 186 in ui-kit/android/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-pin-and-save-messages.mdx#L186

Did you really mean 'snackbars'?
| Bubble footer indicators | ✅ | — |
| Pinned/Saved screens (list, unpin/unsave, empty states, live upkeep) | ✅ | Host + navigate |
| Chat-header "Pinned messages" entry | ✅ (opt-in) | `setShowPinnedMessagesOption(true)` + click listener |
Expand Down
4 changes: 2 additions & 2 deletions ui-kit/android/guide-threaded-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
val group = intent.getParcelableExtra<Group>("group")
val viewModel = ViewModelProvider(this)[ThreadMessageViewModel::class.java]
if (rawMessage != null) {
val parentMessage = BaseMessage.processMessage(JSONObject(rawMessage))

Check warning on line 127 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L127

Did you really mean 'parentMessage'?
viewModel.setParentMessage(parentMessage)

Check warning on line 128 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L128

Did you really mean 'parentMessage'?
}

lifecycleScope.launch {
Expand Down Expand Up @@ -369,7 +369,7 @@

### The Thread Header Bell

[CometChatThreadHeader](/ui-kit/android/threaded-messages-header) renders a subscription bell as a trailing control on the reply-count bar. It flips optimistically on tap and reverts with a toast if the request fails.
[CometChatThreadHeader](/ui-kit/android/threaded-messages-header) renders a subscription bell as a trailing control on the reply-count bar. It flips optimistically on tap and reverts with a snackbar if the request fails.

Check warning on line 372 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L372

Did you really mean 'snackbar'?

<Tabs>
<Tab title="Kotlin (XML Views)">
Expand All @@ -377,7 +377,7 @@
// Hide the bell (e.g. because you host your own — see below)
threadHeader.setThreadSubscriptionVisibility(View.GONE)

// Observe state changes (isSubscribed = the new state)

Check warning on line 380 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L380

Did you really mean 'isSubscribed'?
threadHeader.setOnThreadSubscriptionChange { isSubscribed ->
Log.d(TAG, "Thread subscribed: $isSubscribed")
}
Expand All @@ -403,7 +403,7 @@

#### Hosting the Bell in Your Own Top Bar

Many apps (including the CometChat sample apps) place the subscription bell in the thread screen's **top title bar** rather than the reply-count row. In Compose, the bell is available as a standalone public composable — hide the header's built-in one and host `ThreadSubscriptionBell` wherever you like:

Check warning on line 406 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L406

Did you really mean 'composable'?

<Tabs>
<Tab title="Jetpack Compose">
Expand Down Expand Up @@ -439,14 +439,14 @@

### Subscription Behavior

- **Optimistic with revert** — both surfaces flip instantly on tap, keep one request in flight per thread, and revert with a toast if the server rejects the change. An offline tap fails visibly and reverts; nothing is queued.
- **Optimistic with revert** — both surfaces flip instantly on tap, keep one request in flight per thread, and revert with a snackbar if the server rejects the change. An offline tap fails visibly and reverts; nothing is queued.

Check warning on line 442 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L442

Did you really mean 'snackbar'?
- **Auto-subscribe on reply** — sending a reply in a thread subscribes the user, and every surface flips to the subscribed state automatically.
- **Unsubscribing is not sticky** — replying again, or being @-mentioned, re-subscribes the user.
- **Unknown state renders as unsubscribed** — a message whose subscription state hasn't been learned yet (for example, one that just arrived in real time) shows the enabled subscribe control, never a spinner.

### Cross-Surface Sync

Both surfaces observe the UI Kit event bus, so toggling in one place updates the other without a refetch. If you build your own subscription control, emit and collect `CometChatThreadEvent` through `CometChatEvents.threadEvents` — see [Events](/ui-kit/android/events).

Check warning on line 449 in ui-kit/android/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/android/guide-threaded-messages.mdx#L449

Did you really mean 'refetch'?

### Notifications

Expand Down
Loading