@cometchat/skills 4.3.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
name: cometchat-android-v6-core
|
|
3
3
|
description: "CometChat Android UIKit v6 core setup — Gradle dependencies, SDK initialization, login/logout, and message sending"
|
|
4
4
|
license: "MIT"
|
|
5
|
-
compatibility: "Android 9.0+ (API 28); Kotlin
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
5
|
+
compatibility: "Android 9.0+ (API 28); Kotlin 2.2.0+; AGP 8.9.1+; JDK 17; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x (+ chat-sdk-android:5.x). File-based init (CometChatUIKit.initFromSettings + app/src/main/assets/cometchat-settings.json — ENG-35866 Skills Telemetry) ships in chatuikit-*-android >= 6.0.2 GA on the public cometchat/cometchat Maven repo."
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.1"
|
|
10
9
|
tags: "cometchat, android, init, login, gradle, setup, core"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chatuikit-compose-android:6.x` / `chatuikit-kotlin-android:6.x` (+ `chat-sdk-android:5.x`, `calls-sdk-android:5.x`) — `javap` the resolved AARs from the Gradle cache + `docs/ui-kit/android/v6`. **Official docs:** https://www.cometchat.com/docs/ui-kit/android/v6/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the resolved AAR before relying on them.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** cometchat (dispatcher), cometchat-android-v6-builder-settings (detailed UIKitSettings config), cometchat-android-v6-events (event system)
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
@@ -48,20 +49,24 @@ dependencyResolutionManagement {
|
|
|
48
49
|
|
|
49
50
|
### 1.2 Add Dependencies
|
|
50
51
|
|
|
51
|
-
Choose the stack you need in your module's `build.gradle.kts
|
|
52
|
+
Choose the stack you need in your module's `build.gradle.kts`. **Always resolve `6.0.+` (latest patch) — never hard-pin `6.0.0-beta2` or any earlier preview (ENG-35701).** V6 went GA on 2026-05-25; testers shipped with `-beta2` strings copy-pasted from older docs and missed two bug-fix patches. The dynamic `6.0.+` pin tracks GA forward without manual bumps.
|
|
52
53
|
|
|
53
54
|
```kotlin
|
|
54
55
|
// Jetpack Compose stack (includes core transitively)
|
|
55
|
-
implementation("com.cometchat:chatuikit-compose-android:6.0
|
|
56
|
+
implementation("com.cometchat:chatuikit-compose-android:6.0.+")
|
|
56
57
|
|
|
57
58
|
// Kotlin Views stack (includes core transitively)
|
|
58
|
-
implementation("com.cometchat:chatuikit-kotlin-android:6.0
|
|
59
|
+
implementation("com.cometchat:chatuikit-kotlin-android:6.0.+")
|
|
59
60
|
|
|
60
61
|
// Core only (no UI — for shared modules or custom UI)
|
|
61
|
-
implementation("com.cometchat:chatuikit-core-android:6.0
|
|
62
|
+
implementation("com.cometchat:chatuikit-core-android:6.0.+")
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
### 1.3 SDK Requirements
|
|
65
|
+
### 1.3 SDK + toolchain Requirements
|
|
66
|
+
|
|
67
|
+
> **Toolchain floor (verified building `6.0.2` GA to an APK):** the kit's transitive deps are newer than a default Arctic-Fox-era scaffold, so a fresh project on older tooling fails to build. The build needs:
|
|
68
|
+
> - **AGP ≥ 8.9.1** and **`compileSdk = 36`** — `chatuikit-core` pulls `androidx.core:core(-ktx):1.18.0`, which refuses AGP 8.7.x / compileSdk 35 (`requires Android Gradle plugin 8.9.1 or higher` / `compile against version 36 or later`).
|
|
69
|
+
> - **Kotlin ≥ 2.2.0** — the kit classes ship **Kotlin 2.2.0 metadata**; on Kotlin 1.9 the build fails with `Class 'com.cometchat.uikit.core.CometChatUIKit' was compiled with an incompatible version of Kotlin … metadata version is 2.2.0, but the compiler version 1.9.0 can read versions up to 2.0.0`.
|
|
65
70
|
|
|
66
71
|
```kotlin
|
|
67
72
|
android {
|
|
@@ -79,6 +84,13 @@ android {
|
|
|
79
84
|
}
|
|
80
85
|
```
|
|
81
86
|
|
|
87
|
+
> ⚠️ **Toolchain floors — verified against the published `chatuikit-kotlin-android:6.0.1` in a real `./gradlew :app:assembleDebug` (do NOT understate these):**
|
|
88
|
+
> - **Kotlin ≥ 2.1.0** (NOT "1.9+"). The 6.0.1 kit classes carry Kotlin metadata 2.1.0 and pull `kotlin-stdlib` 2.2.x; a Kotlin 1.9.x or 2.0.x project fails `compileDebugKotlin` with ~20 errors: *"Class … was compiled with an incompatible version of Kotlin. The actual metadata version is 2.1.0, but the compiler … can read versions up to 2.0.0."*
|
|
89
|
+
> - **AGP ≥ 8.9.1.** The kit transitively pulls `androidx.core:1.18.0` (needs AGP 8.9.1+) and `androidx.lifecycle:…-compose:2.9.2` (needs 8.6.0+); on AGP 8.5.x a fresh project fails at `:app:checkDebugAarMetadata`. `compileSdk = 36` already implies a recent AGP.
|
|
90
|
+
> - **Gradle JVM = JDK 17.** AGP 8.9.1 rejects JDK 11/20 as the Gradle JVM in common configs; build with JDK 17. (`compileOptions`/`jvmTarget` above stay at 11 for *your* code — that's the source/bytecode target, distinct from the Gradle daemon's JVM.)
|
|
91
|
+
>
|
|
92
|
+
> A default Android Studio project on AGP 8.5.x + Kotlin 1.9/2.0 hits two hard failures before any CometChat code runs. Bump `settings.gradle`/`build.gradle` plugin versions to `com.android.application` ≥ 8.9.1 and `org.jetbrains.kotlin.android` ≥ 2.1.0.
|
|
93
|
+
|
|
82
94
|
### 1.3a AndroidX + Jetifier (REQUIRED — non-negotiable)
|
|
83
95
|
|
|
84
96
|
The CometChat Chat SDK transitively depends on the legacy `com.android.support:support-compat` library. Modern Android Studio projects (Arctic Fox+) default to `androidx.core` instead. Without Jetifier, Gradle sees the same classes (`android.support.v4.os.ResultReceiver`, etc.) declared in both libraries and fails the build with:
|
|
@@ -100,7 +112,7 @@ android.enableJetifier=true
|
|
|
100
112
|
|
|
101
113
|
All three are **mandatory**. Jetifier rewrites the legacy `android.support.*` references in the CometChat SDK's transitive deps to their `androidx.*` equivalents at build time, so the duplicate-class error doesn't happen.
|
|
102
114
|
|
|
103
|
-
**Why the heap setting matters (F47, 2026-05-22)**: a fresh Android Studio scaffold's default `org.gradle.jvmargs=-Xmx2048m` is **insufficient** when calls features are enabled — `com.cometchat:calls-sdk-android:
|
|
115
|
+
**Why the heap setting matters (F47, 2026-05-22)**: a fresh Android Studio scaffold's default `org.gradle.jvmargs=-Xmx2048m` is **insufficient** when calls features are enabled — `com.cometchat:calls-sdk-android:5.0.+` (the V6 calls peer dep — see `cometchat-android-v6-calls` W1) transitively pulls `react-native` and other heavy deps that Jetifier has to rewrite. The first `assembleDebug` OOMs partway through with `OutOfMemoryError: Java heap space`. Bumping to `4096m` + `MaxMetaspaceSize=1024m` is the validated minimum. If you skip this, the customer sees a confusing mid-build crash with no actionable error.
|
|
104
116
|
|
|
105
117
|
A freshly-created Android Studio project usually has `android.useAndroidX=true` already (Arctic Fox+) but **Jetifier is OFF by default** since it's deprecated in newer SDK landscapes. Both V5 and V6 CometChat SDKs still need it. If `gradle.properties` doesn't have either line, append both. If it has `useAndroidX=true` but no Jetifier line, add the Jetifier line. Idempotent.
|
|
106
118
|
|
|
@@ -126,6 +138,21 @@ configurations.all {
|
|
|
126
138
|
|
|
127
139
|
This is mandatory for both V5 and V6, both Compose and Kotlin Views. Idempotent — if the block already exists, leave it.
|
|
128
140
|
|
|
141
|
+
### 1.3c App theme MUST extend `CometChatTheme.DayNight` (Kotlin Views — REQUIRED)
|
|
142
|
+
|
|
143
|
+
For the **Kotlin Views** stack, the app/activity theme must extend the kit's `CometChatTheme.DayNight` (parent `Theme.MaterialComponents.DayNight.NoActionBar`). The component layouts reference `cometchat*` theme attributes that only that theme defines — a plain `Theme.AppCompat` / `Theme.Material3` / bare `Theme.MaterialComponents` theme makes the **first component inflate crash** (`CometChatConversations` → `MaterialButton`/`MaterialCardView` → `UnsupportedOperationException: Failed to resolve attribute …` or `requires your app theme to be Theme.MaterialComponents`). A default `flutter create`-style or Empty-Activity scaffold does NOT use this theme, so set it explicitly.
|
|
144
|
+
|
|
145
|
+
```xml
|
|
146
|
+
<!-- app/src/main/res/values/themes.xml -->
|
|
147
|
+
<style name="AppTheme" parent="CometChatTheme.DayNight" />
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```xml
|
|
151
|
+
<!-- AndroidManifest.xml → <application android:theme="@style/AppTheme"> -->
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
(Customizing colors/typography on top of this theme → `cometchat-android-v6-kotlin-theming`. The Compose stack themes via `CometChatTheme { }` composables instead — see `cometchat-android-v6-compose-theming`.) Verified by building + running on-device, 2026-06-11.
|
|
155
|
+
|
|
129
156
|
### 1.4 Credentials → `local.properties` → `BuildConfig`
|
|
130
157
|
|
|
131
158
|
V6 has no runtime `.env` lookup; credentials are injected at compile time as `BuildConfig` fields. Do NOT hardcode App ID / Region / Auth Key in source files.
|
|
@@ -174,6 +201,61 @@ If `npx @cometchat/skills-cli provision setup --framework android` ran first, it
|
|
|
174
201
|
|
|
175
202
|
Initialize once in your `Application` class or splash screen — never in every Activity.
|
|
176
203
|
|
|
204
|
+
### File-based init with `cometchat-settings.json` (recommended)
|
|
205
|
+
|
|
206
|
+
> **Version requirement (ENG-35866 — Skills Telemetry).** `CometChatUIKit.initFromSettings(context, callback)` ships in **`chatuikit-{kotlin,compose}-android` ≥ `6.0.2` GA** on the public `cometchat/cometchat` Maven repo (pulls `chatuikit-core-android:6.0.2` + `chat-sdk-android:5.0.3`). It reads `app/src/main/assets/cometchat-settings.json` and lets the SDK self-report `integrationSource = "ai-agent"`. On an older kit (`< 6.0.2`) the method does not exist — use the **`UIKitSettingsBuilder` fallback** below.
|
|
207
|
+
|
|
208
|
+
**Step 1 — create `app/src/main/assets/cometchat-settings.json`** (create the `assets/` dir if it doesn't exist). Fill `appId` / `region` / `credentials.authKey`; leave everything else at the defaults below. These are the **same credentials** used everywhere else in the app — this file is the single source.
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"appId": "APP_ID_HERE",
|
|
213
|
+
"region": "us",
|
|
214
|
+
"credentials": {
|
|
215
|
+
"authKey": "AUTH_KEY_HERE"
|
|
216
|
+
},
|
|
217
|
+
"chatSDK": {
|
|
218
|
+
"presenceSubscription": {
|
|
219
|
+
"type": "ALL_USERS",
|
|
220
|
+
"roles": []
|
|
221
|
+
},
|
|
222
|
+
"autoEstablishSocketConnection": true,
|
|
223
|
+
"adminHost": null,
|
|
224
|
+
"clientHost": null
|
|
225
|
+
},
|
|
226
|
+
"callsSDK": {
|
|
227
|
+
"host": null,
|
|
228
|
+
"adminHost": null,
|
|
229
|
+
"clientHost": null,
|
|
230
|
+
"callsHost": null
|
|
231
|
+
},
|
|
232
|
+
"uiKit": {
|
|
233
|
+
"subscribePresenceForAllUsers": true
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
> Do NOT gitignore `cometchat-settings.json` — the dev-mode `authKey` it holds is no more exposed than a `BuildConfig.COMETCHAT_AUTH_KEY` value.
|
|
239
|
+
|
|
240
|
+
**Step 2 — init in `Application.onCreate()`.** No `UIKitSettingsBuilder` — the SDK reads `app/src/main/assets/cometchat-settings.json` itself:
|
|
241
|
+
|
|
242
|
+
```kotlin
|
|
243
|
+
import com.cometchat.uikit.core.CometChatUIKit
|
|
244
|
+
import com.cometchat.chat.core.CometChat
|
|
245
|
+
import com.cometchat.chat.exceptions.CometChatException
|
|
246
|
+
|
|
247
|
+
CometChatUIKit.initFromSettings(context, object : CometChat.CallbackListener<String>() {
|
|
248
|
+
override fun onSuccess(result: String) {
|
|
249
|
+
// SDK ready — proceed to login
|
|
250
|
+
}
|
|
251
|
+
override fun onError(e: CometChatException) {
|
|
252
|
+
// Handle initialization error
|
|
253
|
+
}
|
|
254
|
+
})
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### `UIKitSettingsBuilder` init (fallback — any kit before `6.0.2`)
|
|
258
|
+
|
|
177
259
|
```kotlin
|
|
178
260
|
import com.cometchat.uikit.core.CometChatUIKit
|
|
179
261
|
import com.cometchat.uikit.core.UIKitSettings
|
|
@@ -214,6 +296,11 @@ See `cometchat-android-v6-builder-settings` for all `UIKitSettingsBuilder` optio
|
|
|
214
296
|
### 3.1 Login with UID (Development Only)
|
|
215
297
|
|
|
216
298
|
```kotlin
|
|
299
|
+
import com.cometchat.uikit.core.CometChatUIKit
|
|
300
|
+
import com.cometchat.chat.core.CometChat // for CometChat.CallbackListener
|
|
301
|
+
import com.cometchat.chat.models.User
|
|
302
|
+
import com.cometchat.chat.exceptions.CometChatException
|
|
303
|
+
|
|
217
304
|
CometChatUIKit.login("user_uid", object : CometChat.CallbackListener<User>() {
|
|
218
305
|
override fun onSuccess(user: User) {
|
|
219
306
|
// User logged in — show chat UI
|
|
@@ -224,6 +311,8 @@ CometChatUIKit.login("user_uid", object : CometChat.CallbackListener<User>() {
|
|
|
224
311
|
})
|
|
225
312
|
```
|
|
226
313
|
|
|
314
|
+
> The login/logout/send snippets in §3 use `CometChat.CallbackListener` — its import (`com.cometchat.chat.core.CometChat`) is shown in the §2 init block but a fresh agent copying only a §3 block needs it too. The four imports above carry it; reuse them across §3.1–§3.4.
|
|
315
|
+
|
|
227
316
|
### 3.2 Login with Auth Token (Production)
|
|
228
317
|
|
|
229
318
|
```kotlin
|
|
@@ -362,10 +451,13 @@ All send methods automatically:
|
|
|
362
451
|
>
|
|
363
452
|
> The recipe below is identical to what `cometchat-android-v5-core` §"Visual Builder integration" prescribes (both reference the same canonical). This page kept for V6 customers who still hit the Visually flow.
|
|
364
453
|
|
|
365
|
-
|
|
454
|
+
> ⚠️ **NAMESPACE WARNING (ENG-35698):** code below imports `com.cometchat.chatuikit.*` (the V5 namespace) because the Visual Builder canonical IS V5-shaped. **Do NOT copy these imports into your V6-native Compose / Kotlin Views code** — V6 Compose uses `com.cometchat.uikit.compose.*` and V6 Kotlin Views uses different module paths. The two namespaces export classes with identical short names but completely different APIs. If you're scaffolding a V6 chat surface elsewhere in the project, use the V6 paths from `cometchat-android-v6-compose-components` / `cometchat-android-v6-kotlin-components` — keep the Visual-Builder-emitted V5 `chat-uikit-android:5.+` module isolated to the screens it generates.
|
|
455
|
+
|
|
456
|
+
When the dispatcher's Step 3.1 sets `customize=visual` and the platform resolves to `android`, skills runs **`cometchat builder export --platform android`** — a single CLI command that downloads the canonical static template ZIP from `preview.cometchat.com/downloads/cometchat-builder-android.zip`, fetches the per-builder settings JSON, applies F3 + F10 missing-field defaults, and writes **3 files/dirs** to `--output` (default: `cometchat/`):
|
|
366
457
|
|
|
367
458
|
- `BuilderSettingsHelper.kt` — verbatim helper (with original `package com.cometchat.builder` declaration; **skills patches the package to the customer's app package** before final placement at `app/src/main/java/<package>/cometchat/`)
|
|
368
459
|
- `cometchat-builder-settings.json` — **envelope-shape JSON** `{ builderId, name, settings: {...} }` (no sentinel — JSON forbids `//` comments)
|
|
460
|
+
- `font/` — 12 font files (Arial / Inter / Roboto / Times — regular/medium/bold), moved to `app/src/main/res/font/` (see the Place + patch table)
|
|
369
461
|
|
|
370
462
|
### 1. Run `cometchat builder export`
|
|
371
463
|
|
|
@@ -382,7 +474,7 @@ Defaults to `--output cometchat/`. The CLI emits the helper with the original `c
|
|
|
382
474
|
| `cometchat/cometchat-builder-settings.json` | `app/cometchat-builder-settings.json` | Move to app module root (sibling of `build.gradle.kts`). The Gradle plugin requires the envelope shape — already provided by the CLI. |
|
|
383
475
|
| `cometchat/BuilderSettingsHelper.kt` | `app/src/main/java/<customer-package>/cometchat/BuilderSettingsHelper.kt` | **Move + 3 transforms** — see F50/F51 below. |
|
|
384
476
|
| `cometchat/font/*` | `app/src/main/res/font/*` | 12 font files (Arial / Inter / Roboto / Times — regular/medium/bold). Auto-emitted by `builder export --platform android` since F48 (2026-05-22). Just move them. |
|
|
385
|
-
| (skills-emitted, not from ZIP) | `app/src/main/java/<customer-package>/cometchat/
|
|
477
|
+
| (skills-emitted, not from ZIP) | `app/src/main/java/<customer-package>/cometchat/MessagesActivity.kt` | **DEFAULT — Views/viewBinding `AppCompatActivity`** mirroring the canonical builder repo's `MessagesActivity` (which is pure Views, **zero Compose**). Mounts the kit's `CometChatMessageHeader` / `CometChatMessageList` / `CometChatMessageComposer` via viewBinding and applies `BuilderSettingsHelper.applySettingsTo*` to each. This is the canonical-matching surface — see "The default surface (Views)" below. |
|
|
386
478
|
|
|
387
479
|
#### F50 + F51 — BuilderSettingsHelper.kt requires 3 transforms on move (NON-NEGOTIABLE)
|
|
388
480
|
|
|
@@ -418,7 +510,7 @@ Without these, the file fails to compile with `Unresolved reference 'R'`, `Unres
|
|
|
418
510
|
// // SKILL.md (README option 2 — no bottom-nav module in app integration).
|
|
419
511
|
```
|
|
420
512
|
|
|
421
|
-
Validated on
|
|
513
|
+
Validated on a fresh builder-demo Android app (2026-05-25) — after all 3 transforms, `./gradlew :app:assembleDebug` → `BUILD SUCCESSFUL in 6s`. F50 + F51 findings.
|
|
422
514
|
|
|
423
515
|
The Gradle plugin REQUIRES the `{ builderId, settings: {...} }` envelope — writing the raw settings blob produces an empty `CometChatBuilderSettings` constants class and Kotlin compile fails with `Unresolved reference 'ChatFeatures'` / `'CallFeatures'`. The CLI always writes the envelope shape.
|
|
424
516
|
|
|
@@ -429,9 +521,9 @@ Resync = re-run `cometchat builder export --platform android --force`. Re-apply
|
|
|
429
521
|
| Path | Patch |
|
|
430
522
|
|---|---|
|
|
431
523
|
| `settings.gradle.kts` | Add `maven("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/")` to BOTH `pluginManagement.repositories` AND `dependencyResolutionManagement.repositories` |
|
|
432
|
-
| `app/build.gradle.kts` | Add `id("com.cometchat.builder.settings") version "5.0.1"` to the `plugins { }` block. Add `implementation("com.cometchat:chat-uikit-android:5.
|
|
524
|
+
| `app/build.gradle.kts` | Add `id("com.cometchat.builder.settings") version "5.0.1"` to the `plugins { }` block. Add `implementation("com.cometchat:chat-uikit-android:5.2.6")` (the version the canonical builder app pins). Add `implementation("com.cometchat:calls-sdk-android:4.3.1")` if `cometchat-builder-settings.json` has any call feature enabled |
|
|
433
525
|
| `gradle.properties` | `android.useAndroidX=true` + `android.enableJetifier=true` per §1.3a (non-negotiable) |
|
|
434
|
-
| `AndroidManifest.xml` | Set `android:theme="@style/CometChat.Builder.Theme"` on `<application>`. Add `RECORD_AUDIO` + `CAMERA` permissions if any `CallFeatures.*` flag is true |
|
|
526
|
+
| `AndroidManifest.xml` | Set `android:theme="@style/CometChat.Builder.Theme"` on `<application>`. Add `RECORD_AUDIO` + `CAMERA` permissions if any `CallFeatures.*` flag is true. **Do NOT hand-author that style** — the `generateBuilderThemeXml` Gradle task auto-writes `res/values/themes.xml` + `res/values-night/themes.xml` (defining `CometChat.Builder.Theme`) into the host module at build time; you only *reference* it here (authoring your own collides with the generated file). Verified live 2026-06-14. |
|
|
435
527
|
| `Application` subclass | Call `CometChatUIKit.init(this, uiKitSettings)` in `onCreate()` per §2 — credentials from `BuildConfig.COMETCHAT_*` via §1.4 |
|
|
436
528
|
|
|
437
529
|
### Init flow (build-time + runtime)
|
|
@@ -452,10 +544,106 @@ if (CometChatBuilderSettings.ChatFeatures.CoreMessagingExperience.PHOTOSSHARING)
|
|
|
452
544
|
BuilderSettingsHelper.applySettingsToMessageList(binding.messageList)
|
|
453
545
|
```
|
|
454
546
|
|
|
455
|
-
### The
|
|
547
|
+
### The default surface (Views) — matches the canonical builder repo
|
|
548
|
+
|
|
549
|
+
The canonical builder repo (`chat-builder/` inside the Android Visual Builder ZIP) is **pure Views** — viewBinding + Activities/Fragments, **zero Compose**. Its `MessagesActivity` extends `AppCompatActivity`, inflates a viewBinding layout, sets `user`/`group` on the kit's View components, and calls `BuilderSettingsHelper.applySettingsTo*` on each. The default surface skills emits mirrors that shape so it drops into a Views-only host with no Compose build setup.
|
|
550
|
+
|
|
551
|
+
```kotlin
|
|
552
|
+
// app/src/main/java/<package>/cometchat/MessagesActivity.kt
|
|
553
|
+
package <package>.cometchat
|
|
554
|
+
|
|
555
|
+
import android.os.Bundle
|
|
556
|
+
import androidx.appcompat.app.AppCompatActivity
|
|
557
|
+
import com.cometchat.builder.BuilderSettingsHelper // copied helper — stays at original package
|
|
558
|
+
import com.cometchat.chat.models.Group
|
|
559
|
+
import com.cometchat.chat.models.User
|
|
560
|
+
import <package>.databinding.ActivityMessagesBinding // viewBinding for your layout
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Views/viewBinding chat surface for the Visual Builder Visually path —
|
|
564
|
+
* mirrors the canonical builder repo's MessagesActivity (pure Views, no Compose).
|
|
565
|
+
*
|
|
566
|
+
* CometChatUIKit.init(...) must have been called in Application.onCreate()
|
|
567
|
+
* BEFORE this Activity launches — see §2.
|
|
568
|
+
*
|
|
569
|
+
* The layout (activity_messages.xml) hosts, top-to-bottom:
|
|
570
|
+
* <com.cometchat.chatuikit.messageheader.CometChatMessageHeader android:id="@+id/messageHeader" .../>
|
|
571
|
+
* <com.cometchat.chatuikit.messagelist.CometChatMessageList android:id="@+id/messageList" .../> (weight=1)
|
|
572
|
+
* <com.cometchat.chatuikit.messagecomposer.CometChatMessageComposer android:id="@+id/messageComposer" .../>
|
|
573
|
+
*/
|
|
574
|
+
class MessagesActivity : AppCompatActivity() {
|
|
575
|
+
private lateinit var binding: ActivityMessagesBinding
|
|
576
|
+
private var user: User? = null
|
|
577
|
+
private var group: Group? = null
|
|
578
|
+
|
|
579
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
|
580
|
+
super.onCreate(savedInstanceState)
|
|
581
|
+
binding = ActivityMessagesBinding.inflate(layoutInflater)
|
|
582
|
+
setContentView(binding.root)
|
|
583
|
+
|
|
584
|
+
// Deserialize the selected user/group from the launching Intent
|
|
585
|
+
// (see the builder repo's MessagesActivity for the Gson/JSON pattern).
|
|
586
|
+
|
|
587
|
+
if (user != null) {
|
|
588
|
+
binding.messageHeader.user = user!!
|
|
589
|
+
binding.messageList.user = user
|
|
590
|
+
binding.messageComposer.user = user
|
|
591
|
+
} else if (group != null) {
|
|
592
|
+
binding.messageHeader.group = group!!
|
|
593
|
+
binding.messageList.group = group
|
|
594
|
+
binding.messageComposer.group = group
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
binding.messageHeader.setOnBackButtonPressed { finish() }
|
|
598
|
+
|
|
599
|
+
// Apply builder settings to each component (verbatim helper from the repo)
|
|
600
|
+
BuilderSettingsHelper.applySettingsToMessageHeader(binding.messageHeader)
|
|
601
|
+
BuilderSettingsHelper.applySettingsToMessageList(binding.messageList)
|
|
602
|
+
BuilderSettingsHelper.applySettingsToMessageComposer(binding.messageComposer)
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
A `CometChatConversations` list (gated by `BuilderSettingsHelper.applySettingsToConversations(...)`) lives in its own Fragment/Activity that launches `MessagesActivity` on item click — again mirroring the repo's `ChatsFragment` → `MessagesActivity` flow.
|
|
608
|
+
|
|
609
|
+
`BuilderSettingsHelper.kt` is copied verbatim from the builder repo. Methods used above:
|
|
610
|
+
- `applySettingsToConversations(...)` → user-status / receipts / search-box visibility
|
|
611
|
+
- `applySettingsToMessageHeader(...)` → voice/video call buttons + user-status visibility (group vs user-aware)
|
|
612
|
+
- `applySettingsToMessageList(...)` → edit/delete/reply-in-thread/reactions/translation/conversation-starter/smart-replies/message-privately visibility
|
|
613
|
+
- `applySettingsToMessageComposer(...)` → attachment/voice-note/poll/sticker/etc. visibility
|
|
614
|
+
|
|
615
|
+
### Compose-only alternative
|
|
616
|
+
|
|
617
|
+
**Only if the host app already uses Jetpack Compose** (it has `buildFeatures { compose = true }`, the Compose BOM, and the `org.jetbrains.kotlin.plugin.compose` plugin), you may instead emit a `@Composable` wrapper that hosts the kit's View components via `AndroidView`. Do NOT emit this on a Views-only app — it won't compile without the Compose build setup, and the canonical repo is Views, not Compose.
|
|
618
|
+
|
|
619
|
+
If the host is Views-only and you (or the customer) still want the Compose wrapper, you must first add the Compose-enable patch to `app/build.gradle.kts`:
|
|
620
|
+
|
|
621
|
+
```kotlin
|
|
622
|
+
plugins {
|
|
623
|
+
// ...existing plugins...
|
|
624
|
+
id("org.jetbrains.kotlin.plugin.compose") // required for Kotlin 2.0+
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
android {
|
|
628
|
+
buildFeatures { compose = true }
|
|
629
|
+
composeOptions {
|
|
630
|
+
// omit kotlinCompilerExtensionVersion when using the Kotlin Compose plugin (2.0+)
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
dependencies {
|
|
635
|
+
val composeBom = platform("androidx.compose:compose-bom:2024.09.00")
|
|
636
|
+
implementation(composeBom)
|
|
637
|
+
implementation("androidx.compose.foundation:foundation")
|
|
638
|
+
implementation("androidx.compose.ui:ui")
|
|
639
|
+
implementation("androidx.activity:activity-compose:1.9.3")
|
|
640
|
+
}
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
Then the Compose wrapper:
|
|
456
644
|
|
|
457
645
|
```kotlin
|
|
458
|
-
// app/src/main/java/<package>/cometchat/CometChatApp.kt
|
|
646
|
+
// app/src/main/java/<package>/cometchat/CometChatApp.kt — COMPOSE-ONLY alternative
|
|
459
647
|
package <package>.cometchat
|
|
460
648
|
|
|
461
649
|
import androidx.compose.foundation.layout.Column
|
|
@@ -475,11 +663,9 @@ import com.cometchat.chatuikit.messageheader.CometChatMessageHeader
|
|
|
475
663
|
import com.cometchat.chatuikit.messagelist.CometChatMessageList
|
|
476
664
|
|
|
477
665
|
/**
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
* (copied from the builder repo) wires CometChatBuilderSettings → component
|
|
482
|
-
* visibility on each instance.
|
|
666
|
+
* Compose-ONLY alternative to MessagesActivity above. Use this ONLY if the host
|
|
667
|
+
* app already enables Compose. Hosts the kit's View-based components via AndroidView;
|
|
668
|
+
* BuilderSettingsHelper wires CometChatBuilderSettings → component visibility.
|
|
483
669
|
*
|
|
484
670
|
* CometChatUIKit.init(...) must have been called in Application.onCreate()
|
|
485
671
|
* BEFORE this composable mounts — see §2.
|
|
@@ -534,13 +720,7 @@ fun CometChatApp() {
|
|
|
534
720
|
}
|
|
535
721
|
```
|
|
536
722
|
|
|
537
|
-
`BuilderSettingsHelper.
|
|
538
|
-
- `applySettingsToConversations(...)` → user-status / receipts / search-box visibility
|
|
539
|
-
- `applySettingsToMessageHeader(...)` → voice/video call buttons + user-status visibility (group vs user-aware)
|
|
540
|
-
- `applySettingsToMessageList(...)` → edit/delete/reply-in-thread/reactions/translation/conversation-starter/smart-replies/message-privately visibility
|
|
541
|
-
- `applySettingsToMessageComposer(...)` → attachment/voice-note/poll/sticker/etc. visibility
|
|
542
|
-
|
|
543
|
-
For a Compose-native stack (`chatuikit-compose-android` instead of `chatuikit-android` Views), skip the `AndroidView` + `BuilderSettingsHelper` indirection and read `CometChatBuilderSettings.ChatFeatures.*` constants directly into the Compose components' visibility/feature props — see `cometchat-android-v6-compose-components`. The Views-via-AndroidView path above matches the canonical builder repo, which is Views-based.
|
|
723
|
+
For a Compose-native UI Kit stack (`chatuikit-compose-android` instead of `chatuikit-android` Views), skip the `AndroidView` + `BuilderSettingsHelper` indirection and read `CometChatBuilderSettings.ChatFeatures.*` constants directly into the Compose components' visibility/feature props — see `cometchat-android-v6-compose-components`. The default Views path above matches the canonical builder repo, which is Views-based.
|
|
544
724
|
|
|
545
725
|
### Calls + builder
|
|
546
726
|
|
|
@@ -551,4 +731,4 @@ If any `CometChatBuilderSettings.CallFeatures.*` flag is true:
|
|
|
551
731
|
|
|
552
732
|
### What is NOT honored in v1
|
|
553
733
|
|
|
554
|
-
The builder repo's `HomeActivity` exposes a `BottomNavigationView` with up to 4 tabs (Chats / Calls / Users / Groups) driven by `CometChatBuilderSettings.Layout.TABS`. Skills emits a single
|
|
734
|
+
The builder repo's `HomeActivity` exposes a `BottomNavigationView` with up to 4 tabs (Chats / Calls / Users / Groups) driven by `CometChatBuilderSettings.Layout.TABS`. Skills emits a single conversations → `MessagesActivity` surface, not the tabbed shape. The corresponding `applySettingsToBottomNavigationView` method is also **intentionally removed** when emitting `BuilderSettingsHelper.kt` (per README option 2). Theme + typography + chat-feature toggles ARE honored. For the full tabbed shape, copy the builder repo's `HomeActivity` + per-tab fragments alongside skills' emission (or use README option 1 — "Import as module").
|
|
@@ -3,13 +3,14 @@ name: cometchat-android-v6-events
|
|
|
3
3
|
description: "CometChat Android UIKit v6 event system — SharedFlow-based reactive event bus for messages, calls, users, groups, conversations, and UI events"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat, android, events, sharedflow, kotlin-flow, reactive"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chatuikit-{compose,kotlin}-android:6.x` (+ `calls-sdk-android:5.x`) — resolved AAR (javap) + `ui-kit/android/v6`. **Official docs:** https://www.cometchat.com/docs/ui-kit/android/v6/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** cometchat-android-v6-core (init/login), cometchat-android-v6-kotlin-customization, cometchat-android-v6-compose-customization
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
@@ -175,6 +176,8 @@ All emit functions are thread-safe — they launch on `Dispatchers.Default` inte
|
|
|
175
176
|
|---|---|---|
|
|
176
177
|
| `CallAccepted` | `call: Call` | Incoming call accepted |
|
|
177
178
|
| `CallRejected` | `call: Call` | Call rejected |
|
|
179
|
+
| `CallEnded` | `call: Call` | Call ended |
|
|
180
|
+
| `OutgoingCall` | `call: Call` | Outgoing call initiated |
|
|
178
181
|
|
|
179
182
|
### 4.3 CometChatUserEvent (sealed class)
|
|
180
183
|
|
|
@@ -3,13 +3,14 @@ name: cometchat-android-v6-extensions
|
|
|
3
3
|
description: "CometChat Android UIKit v6 extension architecture — DataSource/Repository pattern, custom message types, and data-layer overrides"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat, android, extensions, datasource, repository, clean-architecture"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chatuikit-{compose,kotlin}-android:6.x` (+ `calls-sdk-android:5.x`) — resolved AAR (javap) + `ui-kit/android/v6`. **Official docs:** https://www.cometchat.com/docs/fundamentals/extensions-overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** cometchat-android-v6-features (feature catalog), cometchat-android-v6-kotlin-customization, cometchat-android-v6-compose-customization
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
@@ -3,14 +3,15 @@ name: cometchat-android-v6-features
|
|
|
3
3
|
description: "CometChat Android UIKit v6 feature catalog — AI features, reactions, polls, stickers, moderation, collaborative, and media features"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat, android, features, ai, reactions, polls, stickers, moderation"
|
|
11
10
|
---
|
|
12
11
|
|
|
13
|
-
> **
|
|
12
|
+
> **Ground truth:** `com.cometchat:chatuikit-{compose,kotlin}-android:6.x` + `packages/registry/v6/features/catalog.json`. (Official docs linked below.) Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
14
|
+
> **Companion skills:** cometchat-android-v6-kotlin-components, cometchat-android-v6-compose-components, cometchat-android-v6-extensions (DataSource pattern), cometchat-android-v6-events, **cometchat-android-v6-calls** (voice/video calling enablement — recording is a paid add-on)
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
16
17
|
|
|
@@ -27,6 +28,29 @@ Catalog of all features available in CometChat UIKit v6, how they map to compone
|
|
|
27
28
|
- Working with component APIs directly (use `cometchat-*-components`)
|
|
28
29
|
- Customizing bubble rendering (use `cometchat-*-customization`)
|
|
29
30
|
|
|
31
|
+
## 0. Feature categories — what work each needs
|
|
32
|
+
|
|
33
|
+
> **Canonical public feature-availability matrix:** [Features & Extensions Guide](https://www.cometchat.com/docs/fundamentals/features-and-extensions-guide) — the authoritative source for which integration method (UI Kit / UI Kit Builder / Widget Builder / SDK) supports each feature + dashboard setup + whether code is required. It **outranks the local `catalog.json` snapshot on conflict**; consult it (WebFetch or docs MCP) for any availability decision.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Before enabling anything, classify the feature by the product's 5-category "work needed" model:
|
|
37
|
+
|
|
38
|
+
| Category | Work needed | Example |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| **Core (zero-setup)** | Nothing — renders out of the box | Typing indicators, reactions |
|
|
41
|
+
| **Builder-enabled** | Dashboard API + toggle in the UI Kit Builder | Polls |
|
|
42
|
+
| **Config-only** | Dashboard API enable; works automatically | Link preview |
|
|
43
|
+
| **Config + settings** | Dashboard API + extra settings (API keys, thresholds) — no code | Smart replies (OpenAI key) |
|
|
44
|
+
| **SDK-integrated** | Dashboard API + **custom client code** | Bitly |
|
|
45
|
+
|
|
46
|
+
**Key rule:** only **SDK-integrated** features need client code — and **the implementation lives in the docs** (`cometchat features info <id> --json` shows what's needed; fetch + adapt the doc code, don't hand-roll). Everything else is enable-and-done.
|
|
47
|
+
|
|
48
|
+
**Honest-automation boundary (what the CLI can vs can't do):**
|
|
49
|
+
- **Extensions** (polls, link-preview, message-translation, reactions, etc.) → `cometchat apply-feature <id> --app-id <your-app-id>` makes the **real dashboard API call** to flip the toggle. No browser visit, no code. Never tell the user to "open the dashboard and toggle it" for an extension.
|
|
50
|
+
- **AI features** → `cometchat apply-feature <id> --app-id <X> --openai-key sk-...` (sets the key, then enables) — see §1.
|
|
51
|
+
- **Third-party dashboard-only features** (Giphy, Stipop, Tenor, Chatwoot, Intercom, Disappearing Messages, Message Shortcuts) → the CLI returns `manual-action-required` and prints the dashboard path. These need **your** third-party credentials and **cannot be automated** — state that honestly.
|
|
52
|
+
- **Calls** → see `cometchat-android-v6-calls`. **Call recording is a paid plan add-on** — there is no dashboard toggle / CLI call to enable it; the user must contact CometChat support. Never claim recording was "enabled."
|
|
53
|
+
|
|
30
54
|
## 1. AI Features
|
|
31
55
|
|
|
32
56
|
AI features need an OpenAI API key on the app's AI settings. Enable each one with the CLI in stateless mode (Android projects don't write `.cometchat/state.json`):
|
|
@@ -3,13 +3,14 @@ name: cometchat-android-v6-kotlin-components
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Kotlin Views component catalog — all custom View chat UI components, their properties, styles, and usage"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.1"
|
|
10
9
|
tags: "cometchat, android, kotlin-views, components, conversations, messages, users, groups, calls"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chatuikit-kotlin-android:6.x` component catalog (javap the AAR) + `docs/ui-kit/android/v6`. **Official docs:** https://www.cometchat.com/docs/ui-kit/android/v6/components-overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** cometchat-android-v6-compose-components (Compose equivalent), cometchat-android-v6-kotlin-theming, cometchat-android-v6-kotlin-customization, cometchat-android-v6-kotlin-placement
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
@@ -31,6 +32,8 @@ Complete catalog of all Kotlin Views components in CometChat UIKit v6. Each comp
|
|
|
31
32
|
|
|
32
33
|
## 1. Component Catalog
|
|
33
34
|
|
|
35
|
+
> ⛔ **Only the components in THIS catalog exist — do not invent or recall names from v4/older memory.** Before emitting any `CometChat*` view, confirm it's listed below; if it's not here, it doesn't exist (→ "unresolved reference" compile error). **There is no all-in-one component:** the v4-era composites `CometChatConversationsWithMessages` / `CometChatUsersWithMessages` / `CometChatGroupsWithMessages` / `CometChatMessages` and the `CometChatUI` god-view are **absent in the v6 Kotlin-Views kit** (verified against the published `chatuikit-kotlin-android:6.0.1` AAR — the only top-level `CometChat*` views are `CometChatConversations`, `CometChatMessageHeader`, `CometChatMessageList`, `CometChatMessageComposer`, `CometChatMessageInformation`, `CometChatUsers`, `CometChatGroups`). Compose a two-pane experience yourself: `CometChatConversations` (list) → on item-click, host `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer` for the selected `User`/`Group`.
|
|
36
|
+
|
|
34
37
|
### 1.1 List Components
|
|
35
38
|
|
|
36
39
|
| Component | Package | Type | Purpose |
|
|
@@ -43,6 +46,8 @@ Complete catalog of all Kotlin Views components in CometChat UIKit v6. Each comp
|
|
|
43
46
|
|
|
44
47
|
### 1.2 Messaging Components
|
|
45
48
|
|
|
49
|
+
> ⚠️ **There is NO combined `CometChatMessages` View on Android v6 Kotlin-Views either.** Like the Compose surface, v6 Kotlin-Views ships the pieces separately — compose the chat screen manually as `CometChatMessageHeader + CometChatMessageList + CometChatMessageComposer` (see §2.4). No `com.cometchat.uikit.kotlin.presentation.cometchatmessages.CometChatMessages` exists on either surface.
|
|
50
|
+
|
|
46
51
|
| Component | Package | Type | Purpose |
|
|
47
52
|
|---|---|---|---|
|
|
48
53
|
| `CometChatMessageList` | `presentation.messagelist.ui` | View | Message list with bubbles |
|
|
@@ -70,6 +75,8 @@ Complete catalog of all Kotlin Views components in CometChat UIKit v6. Each comp
|
|
|
70
75
|
| `CometChatEmojiKeyboard` | `presentation.emojikeyboard.ui` | View | Emoji picker |
|
|
71
76
|
| `CometChatStickerKeyboard` | `presentation.stickerkeyboard.ui` | View | Sticker picker |
|
|
72
77
|
| `CometChatFlagMessageDialog` | `presentation.report` | Dialog | Report/flag message |
|
|
78
|
+
| `CometChatAIAssistantChatHistory` | `presentation.aiassistantchathistory.ui` | View | AI chat history (extends `MaterialCardView`) |
|
|
79
|
+
| `CometChatNotificationFeed` | `presentation.notificationfeed.ui` | View | Full-screen notification feed (category filter chips, timestamp grouping, rich cards, real-time updates) — extends `FrameLayout` |
|
|
73
80
|
|
|
74
81
|
### 1.5 Shared Elements
|
|
75
82
|
|
|
@@ -182,6 +189,8 @@ Every component has a corresponding style class in its `style/` subpackage:
|
|
|
182
189
|
| `CometChatMessageHeader` | `CometChatMessageHeaderStyle` |
|
|
183
190
|
| `CometChatCallLogs` | `CometChatCallLogsStyle` |
|
|
184
191
|
| `CometChatThreadHeader` | `CometChatThreadHeaderStyle` |
|
|
192
|
+
| `CometChatNotificationFeed` | `CometChatNotificationFeedStyle` (`@ColorInt` Int props; `.default()` factory; `setStyle(style)`) |
|
|
193
|
+
| `CometChatAIAssistantChatHistory` | `CometChatAIAssistantChatHistoryStyle` (`.default(context)`) |
|
|
185
194
|
|
|
186
195
|
Style classes resolve defaults from XML theme attributes and `CometChatTheme` singleton.
|
|
187
196
|
|
|
@@ -189,6 +198,27 @@ Style classes resolve defaults from XML theme attributes and `CometChatTheme` si
|
|
|
189
198
|
|
|
190
199
|
Each component creates its own ViewModel internally via factories from `chatuikit-core`. ViewModels are shared with the Compose stack — the same `CometChatConversationsViewModel` powers both `CometChatConversations` (View) and `CometChatConversations` (@Composable).
|
|
191
200
|
|
|
201
|
+
## 5. Custom State Views (empty / error / loading)
|
|
202
|
+
|
|
203
|
+
The list/data components expose three setters to replace the built-in empty, error, and loading states with your own `View`:
|
|
204
|
+
|
|
205
|
+
```kotlin
|
|
206
|
+
fun setEmptyView(view: View?)
|
|
207
|
+
fun setErrorView(view: View?)
|
|
208
|
+
fun setLoadingView(view: View?)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Verified present on `CometChatConversations`, `CometChatUsers`, `CometChatGroups`, `CometChatGroupMembers`, `CometChatCallLogs`, and `CometChatSearch` (e.g. `CometChatConversations.kt:1045/1052/1059`, `CometChatUsers.kt:735/742/749`). Pass `null` to fall back to the default state view.
|
|
212
|
+
|
|
213
|
+
```kotlin
|
|
214
|
+
val users = findViewById<CometChatUsers>(R.id.users)
|
|
215
|
+
users.setEmptyView(layoutInflater.inflate(R.layout.my_empty_state, null))
|
|
216
|
+
users.setErrorView(layoutInflater.inflate(R.layout.my_error_state, null))
|
|
217
|
+
users.setLoadingView(layoutInflater.inflate(R.layout.my_loading_state, null))
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
> `CometChatMessageList` does NOT expose these `set*View` state setters — customize its empty/error/loading states through styling/bubble customization instead (see `cometchat-android-v6-kotlin-customization`). `CometChatNotificationFeed` instead takes its own programmatic empty/error/loading rendering internally (see §1.4).
|
|
221
|
+
|
|
192
222
|
## Hard rules
|
|
193
223
|
|
|
194
224
|
- Activity theme MUST inherit from `CometChatTheme.DayNight` (or `.Light` / `.Dark`) — `Theme.AppCompat.*`, `Theme.MaterialComponents.*.Bridge`, plain `Theme.MaterialComponents.*`, and `Theme.Material3.*` all crash at component inflation. See `cometchat-android-v6-kotlin-placement` "Activity theme" section.
|