Cometchat android v6 kotlin components

From cometchat/cometchat-skills · View interactive version

Cometchat android v6 kotlin components is an AI agent skill from the GitHub repository cometchat/cometchat-skills. The closed catalog of CometChat Android v6 UI Kit components for the Kotlin XML Views cohort — what exists, the XML tag and import for each, what each one is for, and how to swap custom UI into a component's slot instead of stacking on top. Triggers: 'which cometchat components are there android', '

How to use this skill

Skill file

Ground truth: catalog android-v6.json (293 symbols, generated from the 6.1.1 source and cross-checked against the published AARs) + the live component pages. Verify every symbol against the catalog; fetch attributes from docs (core → references/docs-map.md); never trust memory.

⚠️ This is the Kotlin XML Views cohort. The artifact is chatuikit-kotlin-android, the namespace is com.cometchat.uikit.kotlin.presentation.*, and components are XML tags configured with setX(...). The Compose cohort (chatuikit-compose-android, composable params) is a separate skill — never mix them in one app.

Companion skills (read first)

Use this skill when

"which components does the Android UI Kit have?", "is there a <X> component?", "what's the XML tag for the message list?", "I need a component for <intent>", "can I replace a list row / message bubble?".

Prerequisites & install

Same kit + init as core. One cohort per app: implementation("com.cometchat:chatuikit-kotlin-android:6.1.1"). Every component below is a View — put it in a layout, then configure it in onCreate (findViewById or view binding).

Component catalog (closed list — from `catalogs/android-v6.json`)

Import/tag pattern: com.cometchat.uikit.kotlin.presentation.<area>.ui.<Component>. Not listed here ⇒ not in the catalog ⇒ does not exist.

Conversations & lists — CometChatConversations (the usual entry point) · CometChatUsers · CometChatGroups · CometChatGroupMembers (members + admin actions) · row items for custom rendering: CometChatConversationListItem, CometChatUsersListItem, CometChatGroupMemberListItem, CometChatGroupsItem.

Messaging — CometChatMessageHeader · CometChatMessageList · CometChatMessageComposer · CometChatMessageBubble · CometChatThreadHeader · CometChatThreadScreen · CometChatMessageInformation + CometChatMessageInformationBottomSheet · CometChatMessagePopupMenu · CometChatMessagePreview · CometChatMessageInput · CometChatMessageReaction · CometChatReactionList · CometChatFlagMessageDialog · CometChatTypingIndicator · CometChatReceipt / CometChatReceipts · models CometChatMessageOption, CometChatMessageComposerAction.

Message bubbles by type — CometChatTextBubble · CometChatImageBubble/CometChatImagesBubble · CometChatVideoBubble/CometChatVideosBubble · CometChatAudioBubble/CometChatAudiosBubble · CometChatVoiceNoteBubble · CometChatFileBubble/CometChatFilesBubble · CometChatPollBubble · CometChatStickerBubble · CometChatCardBubble · CometChatCollaborativeBubble · CometChatActionBubble · CometChatCallActionBubble · CometChatMeetCallBubble · CometChatDeleteBubble · CometChatAIAssistantBubble.

Calling (needs the calls artifact — cometchat-android-v6-calls) — CometChatCallButtons · CometChatIncomingCall · CometChatOutgoingCall · CometChatOngoingCall (+ CometChatOngoingCallActivity, CometChatCallActivity) · CometChatCallLogs · CometChatCallLogsListItem.

⚠️ Emitting ANY calling component requires the calls artifact and

"uiKit": { "enableCalling": true } in assets/cometchat-settings.json — otherwise it crashes on

device while compiling fine (the compile gate cannot catch it). Full artifact/flag/result

matrix: docs call-logs page. → cometchat-android-v6-calls.

Search, AI & notifications — CometChatSearch · CometChatSearchBox · CometChatAIAssistantChatHistory · CometChatAIConversationStarterView · CometChatAISmartRepliesView · CometChatAIConversationSummaryView · CometChatNotificationFeed.

Composer add-ons & media — CometChatStickerKeyboard · CometChatEmojiKeyboard · CometChatCreatePoll · CometChatAttachmentTray/CometChatAttachmentTile · CometChatMediaRecorder/CometChatInlineMediaRecorder/CometChatInlineAudioRecorder · CometChatAudioVisualizer/CometChatInlineAudioWaveform · CometChatRichTextToolbar · CometChatSuggestionList · CometChatImagePreview · CometChatImageViewerScreen/CometChatImageViewerActivity · CometChatVideoViewerScreen/CometChatVideoViewerActivity.

Building blocks — CometChatAvatar · CometChatBadgeCount · CometChatStatusIndicator · CometChatDate · CometChatToolbar · CometChatDialog/CometChatConfirmDialog/CometChatLinkEditDialog/CometChatLinkPopupDialog · CometChatPopupMenu · CometChatSnackBar · CometChatEditText/CometChatTextWatcher · CometChatScopeChange · state views CometChatLoadingState/CometChatEmptyState/CometChatErrorState/CometChatErrorAlert · shimmer CometChatShimmerBox/CometChatShimmerContainer/CometChatShimmerFrameLayout/CometChatShimmerDrawable/CometChatShimmerConfig.

Non-visual (used from code) — CometChatUIKit (session) · theming CometChatTheme/CometChatColorScheme/CometChatTypography/CometChatTextAppearance* · CometChatLocalize · CometChatSoundManager · events CometChatEvents + CometChatUIEvent/CometChatMessageEvent/CometChatGroupEvent/CometChatUserEvent/CometChatConversationEvent/CometChatCallEvent · formatters CometChatTextFormatter/CometChatMentionsFormatter/CometChatRichTextFormatter · CometChatPermissionHandler/CometChatPermissionActivity · CometChatAIStreamService.

Using one — XML tag + configure

<com.cometchat.uikit.kotlin.presentation.conversations.ui.CometChatConversations
    android:id="@+id/conversations"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
val conversations = findViewById<CometChatConversations>(R.id.conversations)
conversations.setTitle("Chats")
conversations.setOnItemClick { conversation -> /* navigate */ }

Size it to fill. wrap_content on a list or the chat surface renders a sliver — the kit fills the box you give it (core/references/layout.md).

Custom UI goes IN a slot, not on top

Every list component exposes ViewHolder-listener slots rather than requiring a fork:

Rule: put custom UI in the slot; never overlay your own view on a kit component, and never re-implement a list the kit already ships. Mechanism detail: cometchat-android-v6-kotlin-customization.

⚠️ **A slot with default CONTENT replaces it — CometChatMessageHeader setAuxiliaryViewListener vs

setTrailingView** (verified vs installed 6.0.5 source: Utils.handleView calls removeAllViews()

on messageHeaderAuxiliaryView, whose default child in cometchat_message_header.xml is

CometChatCallButtons; messageHeaderTailView is a default-empty FrameLayout). Setting an

auxiliary view removes the voice/video call buttons — that is the intended way to take over that

area. Extra header icons belong in setTrailingView, which keeps the call buttons intact. Same

contract as the Compose cohort's auxiliaryView/trailingView params.

Group member permissions — the kit enforces them, don't re-implement

CometChatGroupMembers gates its own long-press menu (verified vs 6.0.5 and 6.1.1 GroupMembersPermissionUtils). Rely on it:

| Logged-in user | Menu opens on | Cannot act on |

|---|---|---|

| Owner (uid == group.owner) | anyone but themselves | — |

| Admin (group.scope) | participants, moderators | other admins, owner |

| Moderator | participants only | moderators, admins, owner |

| Participant | nobody | everyone |

Per item on 6.1.1: kick and ban follow the table (a moderator can kick, not ban); change scope is owner (anyone but self) and admin (moderators, participants) only. 6.0.x gave admins kick/ban but no scope change. Scope strings:

CometChatConstants.SCOPE_ADMIN / SCOPE_MODERATOR / SCOPE_PARTICIPANT. Never hand-roll these

checks or hide the component behind your own role logic — you will drift from the kit.

⚠️ Reversed parameter order between the two ownership APIs:

CometChat.updateGroupMemberScope(UID, GUID, scope, listener) but

CometChat.transferGroupOwnership(GUID, UID, listener).

Components that do NOT exist in v6 (never emit these)

v6 ships no combined shell: CometChatConversationsWithMessages, CometChatUsersWithMessages, CometChatGroupsWithMessages, CometChatUI are v4-era names — you compose the screens yourself (...-kotlin-placement). CometChatContacts is not a v6 symbol.

⚠️ CometChatMessageTemplate is absent from the shipped 6.0.5 and 6.1.1 artifacts (verified against the published AARs; logged internally). The old v5 API — setTemplates, setType, setCategory, setBubbleView, setMessageReceipt — all fail to compile. The docs message-template page was corrected upstream (verified 2026-09-09): it is now "Message Bubble Factory" and teaches BubbleFactory + setBubbleFactories. Use BubbleFactory + setBubbleFactories. The compile gate rejects the old form.

Common pitfalls

Mixing cohorts (Compose artifact in a Views app) · assuming a v4/v5 combined shell exists · emitting CometChatMessageTemplate from the docs page · wrap_content on a list · overlaying custom UI instead of using a slot · a custom header icon via setAuxiliaryViewListener (replaces the call-button host — use setTrailingView) · using the Compose namespace (...uikit.compose....) in an XML tag · guessing attributes instead of fetching the component's .md twin.

Verify it works

Every component you emitted is in the list above (Tier-1 catalog) and the app compiles against the pinned kit — ./gradlew :app:assembleDebug # in YOUR app (native-fence.mjs is a pack-repo gate, not installed by the CLI). On device: the component renders at full size with its own loading/empty state, and any slotted custom view appears INSIDE the component. Unsure about an attribute → fetch the page's .md twin; never read kit source for signatures.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.