Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ui-kit/android/campaigns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Campaigns delivers notifications as **Card Schema JSON** — a structured format that defines the visual layout of each notification card. The system consists of three layers:

1. **CometChat Chat SDK** — Fetches feed items, manages read/delivered state, provides real-time listeners, handles push notification tracking
2. **CometChat Cards Library** — Renders Card Schema JSON into native Android views (Jetpack Compose and XML Views)

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

View check run for this annotation

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

ui-kit/android/campaigns.mdx#L23

Did you really mean 'Jetpack'?
3. **CometChat UI Kit** — Provides the ready-to-use `CometChatNotificationFeed` component that wires everything together

### Architecture Flow
Expand Down Expand Up @@ -88,12 +88,12 @@
"light": "transparent",
"dark": "transparent"
},
"textColor": {

Check warning on line 91 in ui-kit/android/campaigns.mdx

View check run for this annotation

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

ui-kit/android/campaigns.mdx#L91

Did you really mean 'textColor'?
"light": "#6C5CE7",
"dark": "#6C5CE7"
},
"size": 40,
"fontSize": 13,

Check warning on line 96 in ui-kit/android/campaigns.mdx

View check run for this annotation

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

ui-kit/android/campaigns.mdx#L96

Did you really mean 'fontSize'?
"borderRadius": 6,
"padding": {
"top": 0,
Expand All @@ -111,14 +111,14 @@
"id": "col_98fed9bd-1a95-4cee-aa81-84a9016e41f2"
}
],
"fallbackText": "",

Check warning on line 114 in ui-kit/android/campaigns.mdx

View check run for this annotation

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

ui-kit/android/campaigns.mdx#L114

Did you really mean 'fallbackText'?
"style": {
"background": {
"light": "#E8E8E8",
"dark": "#E8E8E8"
},
"borderRadius": 16,
"borderColor": {

Check warning on line 121 in ui-kit/android/campaigns.mdx

View check run for this annotation

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

ui-kit/android/campaigns.mdx#L121

Did you really mean 'borderColor'?
"light": "#DFE6E9",
"dark": "#DFE6E9"
},
Expand Down Expand Up @@ -211,7 +211,7 @@
```kotlin
val feed = findViewById<CometChatNotificationFeed>(R.id.notificationFeed)
feed.init(this) // Pass ViewModelStoreOwner
feed.onItemClick = { item -> /* handle tap */ }
feed.setOnItemClick { item -> /* handle tap */ }
```
</Tab>
</Tabs>
Expand Down
6 changes: 6 additions & 0 deletions ui-kit/android/guide-threaded-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
val messageList = findViewById<CometChatMessageList>(R.id.threadMessageList)
val composer = findViewById<CometChatMessageComposer>(R.id.threadComposer)
val unblock = findViewById<View>(R.id.unblockLayout)
// A thread view: until the parent message arrives (below), the list shows its empty state
// instead of the whole conversation. From UI Kit v6.1.1.
messageList.setThreaded(true)

val rawMessage = intent.getStringExtra("raw_json")
// The thread screen needs the conversation TARGET as well as the parent id — carry the
Expand All @@ -121,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 @@ -174,6 +177,9 @@

CometChatMessageList(
parentMessageId = parentMessage.id,
// A thread view: a missing or invalid parent shows the empty state instead of the
// whole conversation. From UI Kit v6.1.1.
threaded = true,
// Required. With only the parent id there is no recipient, so replies silently
// never send.
user = user,
Expand Down Expand Up @@ -371,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 @@ -397,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 @@ -440,7 +446,7 @@

### 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
1 change: 1 addition & 0 deletions ui-kit/android/message-list.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Message List"
description: "Scrollable list of messages for a conversation with real-time updates, reactions, threaded replies, and message actions."

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

View check run for this annotation

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

ui-kit/android/message-list.mdx#L3

Did you really mean 'Scrollable'?
---

`CometChatMessageList` renders a scrollable list of messages for a conversation with real-time updates for new messages, edits, deletions, reactions, and threaded replies.

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

View check run for this annotation

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

ui-kit/android/message-list.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/7c6476ad-message_list-f571abbea715b343416ff5ca1cbc8c9b.png" />
Expand Down Expand Up @@ -278,6 +278,7 @@
| `setMessagesRequestBuilder(builder)` | `messagesRequestBuilder = builder` | Custom message request builder |
| `setBubbleFactories(list)` | `bubbleFactories = list` | Set custom bubble factories for message types |
| `setOnThreadRepliesClick { }` | `onThreadRepliesClick = { }` | Thread reply tap callback |
| `setThreaded(true)` | `threaded = true` | Mark the list as a thread view: a missing or invalid parent message shows the empty state instead of the whole conversation. A valid `setParentMessageId` / `setParentMessage` marks it threaded automatically (from v6.1.1) |
| `setEnableMultipleAttachments(true)` | `enableMultipleAttachments = true` | Render multi-attachment messages with per-type bubbles and batch grouping (default `true`). See [Multiple Attachments](#multiple-attachments) |

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

### Text Formatters (Mentions)

Check warning on line 411 in ui-kit/android/message-list.mdx

View check run for this annotation

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

ui-kit/android/message-list.mdx#L411

Did you really mean 'Formatters'?

<Frame>
<img src="/images/e2732868-mentions_message_bubble-fccf9cbdd63a54c2f734803e4480418a.png" />
Expand Down Expand Up @@ -759,7 +760,7 @@
</Tab>
<Tab title="Jetpack Compose">

Pass composable lambdas that receive the message and its alignment:

Check warning on line 763 in ui-kit/android/message-list.mdx

View check run for this annotation

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

ui-kit/android/message-list.mdx#L763

Did you really mean 'composable'?

```kotlin lines
CometChatMessageList(
Expand Down Expand Up @@ -861,7 +862,7 @@
Three groups of options appear automatically when their feature is enabled for the app — no wiring needed:

- **Pin message / Unpin message** — shown on text and media messages when `CometChatUIKit.isPinMessageEnabled()`. The option is shown to **every** participant: permission is enforced by the server, and a user who lacks it gets a "you don't have permission" toast (`ERR_PERMISSION_DENIED`) rather than a hidden option. Pinning applies immediately with a toast; unpinning asks for confirmation first. Pinned messages get a pin indicator in the bubble footer.
- **Save message / Unsave message** — shown on text and media messages when `CometChatUIKit.isSaveMessageEnabled()`, for every user. Saving applies immediately with a toast; unsaving asks for confirmation first. Saved messages get a bookmark indicator in the bubble footer.

Check warning on line 865 in ui-kit/android/message-list.mdx

View check run for this annotation

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

ui-kit/android/message-list.mdx#L865

Did you really mean 'Unsave'?

Check warning on line 865 in ui-kit/android/message-list.mdx

View check run for this annotation

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

ui-kit/android/message-list.mdx#L865

Did you really mean 'unsaving'?
- **Subscribe to thread / Unsubscribe from thread** — shown on regular messages (not agent or moderation-blocked ones) from **v6.1.0**, where thread subscription is on by default; on **v6.0.x** it appears only after `UIKitSettings.setEnableThreadSubscription(true)`. On a thread reply the action targets the thread's root message. Hide it with `setThreadSubscriptionOptionVisibility(View.GONE)`.

Pin and Save are withheld on messages where the action is meaningless or would fail — deleted messages, messages that have not finished sending, and messages held or rejected by moderation. The labels toggle with the message's current state, and if a pin/save limit is exceeded the limit toast is generated from the server response automatically. See the [Pin & Save Messages](/ui-kit/android/guide-pin-and-save-messages) guide and [Threaded Messages → Thread Subscription](/ui-kit/android/guide-threaded-messages#thread-subscription).
Expand Down
12 changes: 6 additions & 6 deletions ui-kit/android/notification-feed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
description: "Full-screen notification feed component with category filtering, card rendering, real-time updates, and engagement reporting."
---

`CometChatNotificationFeed` displays a scrollable notification feed where each item is rendered as a native card using the CometChat Cards library. It handles fetching, pagination, category filtering, timestamp grouping, real-time updates, and read/delivered/engagement reporting automatically.

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

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/campaigns-overview.png" />
Expand Down Expand Up @@ -42,8 +42,8 @@
```kotlin
val feed = findViewById<CometChatNotificationFeed>(R.id.notificationFeed)
feed.init(this) // Pass Activity or Fragment — needed to create the ViewModel
feed.onItemClick = { item -> /* navigate */ }
feed.onBackPress = { finish() }
feed.setOnItemClick { item -> /* navigate */ }
feed.setOnBackPress { finish() }
```
</Tab>
</Tabs>
Expand Down Expand Up @@ -145,7 +145,7 @@
</Tab>
<Tab title="Kotlin (XML Views)">
```kotlin
feed.onItemClick = { item ->
feed.setOnItemClick { item ->
// Handle item tap
}
```
Expand Down Expand Up @@ -173,7 +173,7 @@
</Tab>
<Tab title="Kotlin (XML Views)">
```kotlin
feed.onActionClick = { item, actionMap ->
feed.setOnActionClick { item, actionMap ->
val actionType = actionMap["type"] as? String
// Handle action
}
Expand All @@ -189,7 +189,7 @@
<Tab title="Jetpack Compose">
```kotlin
CometChatNotificationFeed(
onError = { exception ->

Check warning on line 192 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L192

Did you really mean 'onError'?
Log.e("Feed", "Error: ${exception.message}")
}
)
Expand All @@ -197,7 +197,7 @@
</Tab>
<Tab title="Kotlin (XML Views)">
```kotlin
feed.onError = { exception ->
feed.setOnError { exception ->
Log.e("Feed", "Error: ${exception.message}")
}
```
Expand All @@ -220,7 +220,7 @@
<Tab title="Kotlin (XML Views)">
```kotlin
feed.setShowBackButton(true)
feed.onBackPress = { finish() }
feed.setOnBackPress { finish() }
```
</Tab>
</Tabs>
Expand Down Expand Up @@ -265,7 +265,7 @@
<Tab title="Jetpack Compose">
```kotlin
CometChatNotificationFeed(
headerView = {

Check warning on line 268 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L268

Did you really mean 'headerView'?
Row(
modifier = Modifier.fillMaxWidth().padding(16.dp),
verticalAlignment = Alignment.CenterVertically
Expand Down Expand Up @@ -318,7 +318,7 @@
```kotlin
CometChatNotificationFeed(
style = CometChatNotificationFeedStyle(
backgroundColor = Color(0xFFF5F5F5),

Check warning on line 321 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L321

Did you really mean 'backgroundColor'?
headerBackgroundColor = Color.White,
headerTitleColor = Color(0xFF141414),
chipActiveBackgroundColor = Color(0xFF3399FF),
Expand All @@ -336,7 +336,7 @@
<Tab title="Kotlin (XML Views)">
```kotlin
feed.setStyle(CometChatNotificationFeedStyle(
backgroundColor = Color.parseColor("#F5F5F5"),

Check warning on line 339 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L339

Did you really mean 'backgroundColor'?
headerTitleColor = Color.parseColor("#141414"),
chipActiveBackgroundColor = Color.parseColor("#3399FF"),
chipActiveTextColor = Color.WHITE,
Expand Down Expand Up @@ -386,15 +386,15 @@
<Tabs>
<Tab title="Jetpack Compose">
```kotlin
val viewModel: CometChatNotificationFeedViewModel = viewModel(

Check warning on line 389 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L389

Did you really mean 'viewModel'?

Check warning on line 389 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L389

Did you really mean 'viewModel'?
factory = CometChatNotificationFeedViewModelFactory(
feedRequestBuilder = customBuilder,

Check warning on line 391 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L391

Did you really mean 'customBuilder'?
pollingIntervalMs = 60_000L // 1 minute polling
)
)

CometChatNotificationFeed(
viewModel = viewModel

Check warning on line 397 in ui-kit/android/notification-feed.mdx

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L397

Did you really mean 'viewModel'?
)
```
</Tab>
Expand Down Expand Up @@ -432,7 +432,7 @@
<Tab title="Jetpack Compose">
```kotlin
CometChatNotificationFeed(
showHeader = false,

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

View check run for this annotation

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

ui-kit/android/notification-feed.mdx#L435

Did you really mean 'showHeader'?
showFilterChips = false
)
```
Expand Down
Loading