Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
26adf61
docs(ui-kit): reframe thread subscription and pin & save coverage
hritika-cometchat Sep 11, 2026
e0f8f2a
docs(android-uikit): drop remaining thread-subscription gate wording
hritika-cometchat Sep 11, 2026
cbfdf43
docs(android-uikit): nest Thread Subscription under Threaded Conversa…
hritika-cometchat Sep 11, 2026
c695399
docs(android-uikit): align pin, save and thread subscription with Rea…
hritika-cometchat Sep 15, 2026
37728b4
docs(android-uikit): add text color guide using the composer trailing…
hritika-cometchat Sep 16, 2026
9fbb127
docs(android-uikit): register the color formatter on pinned/saved, no…
hritika-cometchat Sep 16, 2026
6a0978d
docs(android-uikit): restructure the color guide to match React, alig…
hritika-cometchat Sep 16, 2026
b949f0f
docs(android-uikit): version-gate thread subscription, restore the de…
hritika-cometchat Sep 21, 2026
5b9d638
docs(android-uikit): drop the React core-features change, add the sys…
hritika-cometchat Sep 26, 2026
f2181b3
docs(android-uikit): align pin, save and thread subscription with React
hritika-cometchat Sep 26, 2026
bf17142
docs(android-uikit): point llms page at the merged thread-subscriptio…
hritika-cometchat Sep 26, 2026
cf74ec4
docs(android-uikit): address review on pin, save, thread subscription…
hritika-cometchat Oct 1, 2026
f173111
docs(android-uikit): document Compose hide options, correct the pinne…
hritika-cometchat Oct 1, 2026
4237d2f
docs(android-uikit): fix Compose option-visibility parameter names in…
hritika-cometchat Oct 1, 2026
89f0afd
docs(android-uikit): address review on text color snippet, system-pin…
hritika-cometchat Oct 5, 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
6 changes: 5 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1867,13 +1867,13 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
"ui-kit/android/guide-call-log-details",
"ui-kit/android/guide-group-chat",
"ui-kit/android/guide-text-color",
"ui-kit/android/custom-text-formatter-guide",
"ui-kit/android/mentions-formatter-guide",
"ui-kit/android/shortcut-formatter-guide",
Expand Down Expand Up @@ -6979,6 +6979,10 @@
"source": "/ui-kit/react/property-changes",
"destination": "/ui-kit/react/migration-property-changes"
},
{
"source": "/ui-kit/android/guide-thread-subscription",
"destination": "/ui-kit/android/guide-threaded-messages#thread-subscription"
},
{
"source": "/ui-kit/android/property-changes",
"destination": "/ui-kit/android/upgrading-from-v4"
Expand Down
Binary file added images/pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 56 additions & 13 deletions 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 @@ -165,6 +165,15 @@
| With tags | `.setTags(listOf("vip")).withTags(true)` |
| Filter by user tags | `.withUserAndGroupTags(true).setUserTags(listOf("premium"))` |
| Filter by group tags | `.withUserAndGroupTags(true).setGroupTags(listOf("support"))` |
| Pinned conversations only | `.setPinnedBy("system,me")` |

The default list already arrives pin-ordered, so `setPinnedBy` is only for a **dedicated pinned list** — `"me"` for the user's own pins, `"system"` for admin/global pins, `"system,me"` for both. See [Pin A Conversation (SDK)](/sdk/android/v5/pin-conversation).

```kotlin lines
conversations.setConversationsRequestBuilder(
ConversationsRequest.ConversationsRequestBuilder().setPinnedBy("system,me")
)
```

<Warning>
Pass the builder object, not the result of `.build()`. The component calls `.build()` internally. Default page size is 30 with infinite scroll.
Expand Down Expand Up @@ -419,6 +428,52 @@

---

## Pinning Conversations

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.

<Warning>
**Pin Conversation must be enabled for your app** through the `features.ux.conversations.pinned.enabled` app setting. 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 the Dashboard flag, 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)">
```kotlin lines
conversations.setPinConversationOptionVisibility(View.GONE)
```
</Tab>
<Tab title="Jetpack Compose">
```kotlin lines
CometChatConversations(
hidePinOption = true
)
```
</Tab>
</Tabs>

### Reading pin state

```kotlin lines
val isPinned = conversation.isPinned // pinnedAt > 0

// An admin/global pin. A user can neither pin nor unpin one of these
// (the server rejects it with ERR_SYSTEM_PINNED_CONVERSATION), so hide
// or disable the pin/unpin control.
val isSystemPinned = conversation.isSystemPinned // pinnedBy == "app_system"
```

<Note>
The conversation list arrives **already pin-ordered** from the server — admin pins first, then the user's own, then everything else — and each row carries its pin attributes. You do not need a separate fetch to render a pinned section. To render a pinned-**only** list, use the `setPinnedBy` filter shown in [Filtering Conversations](#filtering-conversations).
</Note>

For pins made elsewhere, the Chat SDK exposes `CometChat.ConversationListener` with `onConversationPinned` / `onConversationUnpinned`. See [Pin A Conversation (SDK)](/sdk/android/v5/pin-conversation) for those callbacks, the pin methods, and the per-user pin limit underneath.

---

## Functionality

| Method (Kotlin XML) | Compose Parameter | Description |
Expand All @@ -431,7 +486,7 @@
| `setSelectionMode(MULTIPLE)` | `selectionMode = MULTIPLE` | Enable selection mode |
| `setTitle("Chats")` | `title = "Chats"` | Custom toolbar title |
| `setSearchPlaceholderText("Search...")` | `searchPlaceholderText = "Search..."` | Search placeholder |
| `setPinConversationOptionVisibility(View.GONE)` | — | Hide the built-in Pin/Unpin conversation option |
| `setPinConversationOptionVisibility(View.GONE)` | `hidePinOption = true` | Hide the built-in Pin/Unpin conversation option |

---

Expand Down Expand Up @@ -709,18 +764,6 @@
</Tab>
</Tabs>

### Built-in Pin Conversation Option

When the Pin Conversation feature is enabled for your app (`CometChatUIKit.isPinConversationEnabled()`), the long-press menu automatically includes **Pin conversation** / **Unpin conversation** — no wiring needed. Pinning applies immediately with a toast; unpinning asks for confirmation first. Pinned conversations display a pin indicator next to the timestamp and stay at the **top of the list**, holding their position even as new messages arrive in other chats. Hide the option with `setPinConversationOptionVisibility(View.GONE)`.

To render a pinned-only list, pass a request builder with the pinned filter — see [Pin A Conversation (SDK)](/sdk/android/v5/pin-conversation):

```kotlin lines
conversations.setConversationsRequestBuilder(
ConversationsRequest.ConversationsRequestBuilder().setPinnedBy("system,me")
)
```

---

## Common Patterns
Expand Down
29 changes: 24 additions & 5 deletions 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 @@ -147,15 +147,33 @@
| [CometChatSavedMessages](/ui-kit/android/saved-messages) | Full-screen, private list of the user's saved messages. |
| [CometChatMessageHeader](/ui-kit/android/message-header) | Built-in "Pinned messages" menu entry point. |

See the [Pin & Save Messages guide](/ui-kit/android/guide-pin-and-save-messages) for end-to-end wiring.
Each feature is switched on per app, and each carries its own cap:

| App setting | Controls |
| --- | --- |
| `features.ux.messages.pinned.enabled` | Whether the pin options and screen render at all |
| `features.ux.messages.pinned.limit` | Pinned messages per conversation |
| `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).

Check warning on line 159 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#L159

Did you really mean 'walkthrough'?

## Pin Conversations

Keep the chats that matter at the top. Users pin a conversation from the long-press menu; pinned conversations show a pin indicator and stay above the rest of the list.

| Component | Role |
| --- | --- |
| [CometChatConversations](/ui-kit/android/conversations) | Provides the Pin/Unpin conversation option, the row indicator, and pinned-first ordering. |
| [CometChatConversations](/ui-kit/android/conversations#pinning-conversations) | Provides the Pin/Unpin conversation option, the row indicator, and pinned-first ordering. |

Conversation pinning is switched on per app, and carries its own cap:

| App setting | Controls |
| --- | --- |
| `features.ux.conversations.pinned.enabled` | Whether the pin/unpin conversation option renders |
| `features.ux.conversations.pinned.limit` | Pinned conversations per user |

A conversation can also be **system-pinned** app-wide by your app. System pins always sort above user pins, and a user can neither pin nor unpin them. See [Conversations → Pinning Conversations](/ui-kit/android/conversations#pinning-conversations).

## Rich Text Formatting

Expand All @@ -169,6 +187,7 @@
| --- | --- |
| [CometChatMessageComposer](/ui-kit/android/message-composer) | Provides a built-in rich text editor with formatting toolbar and text selection menu items for bold, italic, strikethrough, code, links, lists, blockquotes, and code blocks. |
| [CometChatMessageList](/ui-kit/android/message-list) | Renders formatted messages with the appropriate styling automatically applied, ensuring that rich text formatting is displayed exactly as intended by the sender. |

## Threaded Conversations

Respond directly to a specific message, keeping conversations organized.
Expand All @@ -183,16 +202,16 @@
| [CometChatMessageComposer](/ui-kit/android/message-composer) | Allows composing messages within a thread. |
| [CometChatMessageList](/ui-kit/android/message-list) | Displays threaded messages in context. |

## Thread Subscription
### Thread Subscription

Let users subscribe to or unsubscribe from a thread to control whether its replies notify them. Opt-in feature — enable it with `UIKitSettings.setEnableThreadSubscription(true)`.
Let users subscribe to or unsubscribe from a thread to control whether its replies notify them. Enabled by default from **v6.1.0** — remove a surface with `setThreadSubscriptionOptionVisibility(View.GONE)` or `setThreadSubscriptionVisibility(View.GONE)`. On **v6.0.x** the feature is opt-in via `UIKitSettings.setEnableThreadSubscription(true)`.

| Component | Role |
| --- | --- |
| [CometChatMessageList](/ui-kit/android/message-list) | Provides the Subscribe to thread / Unsubscribe from thread option in the message action sheet. |
| [CometChatThreadHeader](/ui-kit/android/threaded-messages-header) | Shows the subscription bell on the thread view. |

See the [Thread Subscription guide](/ui-kit/android/guide-thread-subscription) for setup and behavior.
Subscriptions are also created automatically by the **server**, so they apply to any app on the SDK, not just the UI Kit: sending a message subscribes you to that message's own thread, posting a reply subscribes you to that thread, and being @mentioned in a reply subscribes you. The kit reflects these the moment they happen. See [Threaded Messages → Thread Subscription](/ui-kit/android/guide-threaded-messages#thread-subscription) for setup and behavior.

## Quoted Replies

Expand Down
2 changes: 1 addition & 1 deletion ui-kit/android/custom-text-formatter-guide.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Custom Text Formatter"
sidebarTitle: "Custom Text Formatter"
sidebarTitle: "Text Formatter Base Class"
description: "Extend CometChatTextFormatter to build custom inline text patterns with tracking characters and suggestion lists."
---

Expand All @@ -9,7 +9,7 @@
| Field | Value |
| --- | --- |
| Packages | `com.cometchat:chatuikit-kotlin-android` · `com.cometchat:chatuikit-compose-android` |
| Key class | `CometChatTextFormatter` (abstract base class for custom formatters) |

Check warning on line 12 in ui-kit/android/custom-text-formatter-guide.mdx

View check run for this annotation

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

ui-kit/android/custom-text-formatter-guide.mdx#L12

Did you really mean 'formatters'?
| Required setup | `CometChatUIKit.init()` then `CometChatUIKit.login("UID")` |
| Purpose | Extend to create custom inline text patterns with tracking characters, suggestion lists, and span formatting |
| Features | Tracking character activation, suggestion list, span formatting per context (composer, bubbles, conversations), pre-send hooks |
Expand All @@ -18,7 +18,7 @@

</Accordion>

`CometChatTextFormatter` is an abstract class for formatting text in the message composer and message bubbles. Extend it to build custom formatters — hashtags, shortcuts, or any pattern triggered by a tracking character.

Check warning on line 21 in ui-kit/android/custom-text-formatter-guide.mdx

View check run for this annotation

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

ui-kit/android/custom-text-formatter-guide.mdx#L21

Did you really mean 'formatters'?

| Capability | Description |
| --- | --- |
Expand Down Expand Up @@ -46,7 +46,7 @@
</Tab>
<Tab title="Jetpack Compose">
```kotlin lines
// Same class — formatters are shared between both modules

Check warning on line 49 in ui-kit/android/custom-text-formatter-guide.mdx

View check run for this annotation

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

ui-kit/android/custom-text-formatter-guide.mdx#L49

Did you really mean 'formatters'?
class HashTagFormatter : CometChatTextFormatter('#') {
private val suggestions: MutableList<SuggestionItem> = ArrayList()
}
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/android/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Field | Value |
| --- | --- |
| Kotlin (XML Views) | `com.cometchat:chatuikit-kotlin-android` |
| Jetpack Compose | `com.cometchat:chatuikit-compose-android` |

Check warning on line 11 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L11

Did you really mean 'Jetpack'?
| Import | `com.cometchat.uikit.core.events.CometChatEvents` |
| Event flows | `CometChatEvents.messageEvents`, `CometChatEvents.callEvents`, `CometChatEvents.conversationEvents`, `CometChatEvents.groupEvents`, `CometChatEvents.userEvents`, `CometChatEvents.uiEvents` |
| Pattern | Kotlin `SharedFlow` with sealed class event types — collect in `viewModelScope` or `lifecycleScope` |
Expand Down Expand Up @@ -71,14 +71,14 @@
| `CometChatMessageEvent.MessagePinned(message)` | Triggered when a message is pinned. |
| `CometChatMessageEvent.MessageUnpinned(message)` | Triggered when a message is unpinned. |
| `CometChatMessageEvent.MessageSaved(message)` | Triggered when the logged-in user saves a message. |
| `CometChatMessageEvent.MessageUnsaved(message)` | Triggered when the logged-in user unsaves a message. |

Check warning on line 74 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L74

Did you really mean 'unsaves'?

**Collecting events:**

<Tabs>
<Tab title="Kotlin (XML Views)">
```kotlin
// In an Activity or Fragment — use lifecycleScope

Check warning on line 81 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L81

'lifecycleScope' is repeated!

Check warning on line 81 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L81

Did you really mean 'lifecycleScope'?
lifecycleScope.launch {
CometChatEvents.messageEvents.collect { event ->
when (event) {
Expand Down Expand Up @@ -155,7 +155,7 @@

### Thread Events

`CometChatEvents.threadEvents` emits `CometChatThreadEvent` instances when the logged-in user subscribes to or unsubscribes from a message thread, so every surface showing a subscription control can stay in sync without a refetch.

Check warning on line 158 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L158

Did you really mean 'refetch'?

Every event on this bus is published by the UI Kit itself — the Chat SDK has no thread listener, and a `subscribeToThread()` / `unsubscribeFromThread()` callback *is* the acknowledgement. Because surfaces do not share message instances, a handler should update its own state **and** stamp the flag onto the message objects it holds with `BaseMessage.setThreadSubscribed()`.

Expand All @@ -181,7 +181,7 @@
}
```

See the [Thread Subscription guide](/ui-kit/android/guide-thread-subscription) for the feature end to end.
See [Threaded Messages → Thread Subscription](/ui-kit/android/guide-threaded-messages#thread-subscription) for the feature end to end.

### Call Events

Expand Down Expand Up @@ -543,7 +543,7 @@
</Tab>
</Tabs>

> **About `CardActionClicked`:** The UI Kit renders card bubbles automatically (`CometChatCardBubble`) and emits this event when a user taps an action inside one — so a single subscriber handles every card action across your app. `event.message` is a `CardMessage` for standalone [card messages](/sdk/android/v5/send-message#card-message) and an `AIAssistantMessage` for cards embedded in AI agent replies. `event.actionEvent` is typed `Any`; import and cast it to `com.cometchat.cards.actions.CometChatCardActionEvent` to read its `action`, `elementId`, and `cardJson`.

Check warning on line 546 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L546

Did you really mean 'elementId'?

Check warning on line 546 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L546

Did you really mean 'cardJson'?

---

Expand All @@ -551,8 +551,8 @@

Since `SharedFlow` collection is coroutine-based, lifecycle management is handled automatically:

- In XML Views, use `lifecycleScope.launch` — the coroutine is cancelled when the lifecycle owner is destroyed.

Check warning on line 554 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L554

Did you really mean 'coroutine'?
- In Jetpack Compose, use `LaunchedEffect` — the coroutine is cancelled when the composable leaves the composition.

Check warning on line 555 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L555

Did you really mean 'Jetpack'?

Check warning on line 555 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L555

Did you really mean 'coroutine'?

Check warning on line 555 in ui-kit/android/events.mdx

View check run for this annotation

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

ui-kit/android/events.mdx#L555

Did you really mean 'composable'?

No manual `removeListener` calls are needed, unlike the old static listener pattern.

Expand Down
3 changes: 2 additions & 1 deletion ui-kit/android/guide-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

</Accordion>

> This page indexes focused, task‑oriented feature guides for the Android UI Kit. Each guide shows how to implement a specific capability end‑to‑end using UIKit components. Guides include both **Kotlin (XML Views)** and **Jetpack Compose** examples where applicable.

Check warning on line 19 in ui-kit/android/guide-overview.mdx

View check run for this annotation

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

ui-kit/android/guide-overview.mdx#L19

Did you really mean 'UIKit'?

Check warning on line 19 in ui-kit/android/guide-overview.mdx

View check run for this annotation

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

ui-kit/android/guide-overview.mdx#L19

Did you really mean 'Jetpack'?

## When to Use These Guides

Expand All @@ -27,7 +27,7 @@
| Module | Description |
|:-------|:------------|
| `chatuikit-kotlin` | Traditional XML-based Views for use with Activities and Fragments. |
| `chatuikit-compose` | Jetpack Compose components for declarative UI. |

Check warning on line 30 in ui-kit/android/guide-overview.mdx

View check run for this annotation

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

ui-kit/android/guide-overview.mdx#L30

Did you really mean 'Jetpack'?

## Guide Directory

Expand All @@ -41,7 +41,8 @@
| [Threaded Messages](/ui-kit/android/guide-threaded-messages) | Threaded replies: open parent message context, list replies, compose with parent linkage. |
| [Search Messages](/ui-kit/android/guide-search-messages) | Full-text message search across conversations with result routing and navigation. |
| [AI Agent](/ui-kit/android/guide-ai-agent) | Build an AI-powered agent that responds to user messages using CometChat's AI features. |
| [Custom Text Formatter](/ui-kit/android/custom-text-formatter-guide) | Extend `CometChatTextFormatter` to build custom inline text patterns with tracking characters and suggestion lists. |
| [Color Selected Text](/ui-kit/android/guide-text-color) | Add a color button to the composer toolbar that colors selected text, rendered in the sent message. |
| [Text Formatter Base Class](/ui-kit/android/custom-text-formatter-guide) | Extend `CometChatTextFormatter` to build custom inline text patterns with tracking characters and suggestion lists. |
| [Mentions Formatter](/ui-kit/android/mentions-formatter-guide) | Format @mentions with styled tokens, suggestion lists, and click handling. |
| [ShortCut Formatter](/ui-kit/android/shortcut-formatter-guide) | Add shortcut text expansion to the message composer via the message-shortcuts extension. |

Expand Down
33 changes: 32 additions & 1 deletion 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.

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'?

## 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.
- **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.

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'?
- 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 @@ -144,15 +144,46 @@
</Tab>
</Tabs>

## App Settings and Limits

Each feature is switched on per app, and each carries a cap on how many items a user may pin or save. Both are configured as app settings in the dashboard:

| Setting | Controls |
| --- | --- |
| `features.ux.messages.pinned.enabled` | Whether the pin options and screen render at all |
| `features.ux.messages.pinned.limit` | Pins per conversation |
| `features.ux.messages.saved.enabled` | Whether the save options and screen render at all |
| `features.ux.messages.saved.limit` | Saves per user |
| `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.

### 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:

| Code | Meaning |
| --- | --- |
| `ERR_PERMISSION_DENIED` | The acting user's role may not pin or unpin here. Pin and unpin are gated independently. |
| `ERR_PINNED_MESSAGES_LIMIT_EXCEEDED` | The conversation's pin cap was reached. |
| `ERR_SAVED_MESSAGES_LIMIT_EXCEEDED` | The user's save cap was reached. |
| `ERR_PINNED_CONVERSATIONS_LIMIT_EXCEEDED` | The user's conversation pin cap was reached. |
| `ERR_SYSTEM_PINNED_CONVERSATION` | The conversation is **system-pinned** for all users by the app, so a user can neither pin nor unpin it. |
Comment thread
hritika-cometchat marked this conversation as resolved.
| `ERR_MESSAGE_NO_ACCESS` | The user has no access to that message — for example they are not a participant in its conversation. |
| `ERR_FEATURE_NOT_ACCESSIBLE` | The feature is not enabled for the app. |

The limit and system-pin codes are also listed in the [Error Guide](/articles/error-guide).

## 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 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).
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 | ✅ | — |

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'?
| 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
Loading
Loading