@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.
Files changed (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +3 -2
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +258 -20
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +314 -35
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +140 -79
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
  184. package/skills/cometchat-native-calls/SKILL.md +29 -17
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +102 -33
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
  202. package/skills/cometchat-native-features/SKILL.md +24 -17
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +45 -5
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -3,13 +3,14 @@ name: cometchat-android-v6-kotlin-customization
3
3
  description: "CometChat Android UIKit v6 Kotlin Views customization — BubbleFactory abstract class, BubbleViewProvider, style classes, and per-slot overrides"
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.0"
10
9
  tags: "cometchat, android, kotlin-views, customization, bubble-factory, bubble-view-provider, style"
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-compose-customization (Compose equivalent), cometchat-android-v6-kotlin-components, cometchat-android-v6-kotlin-theming, cometchat-android-v6-extensions (DataSource layer), cometchat-android-v6-events
14
15
 
15
16
  ## Purpose
@@ -156,6 +157,157 @@ val key = BubbleFactory.getFactoryKey(message) // "category_type" or "deleted"
156
157
  val key = BubbleFactory.getKey("custom", "location") // "custom_location"
157
158
  ```
158
159
 
160
+ ### 1.8 Registering a factory is already additive — built-ins are NOT in the map
161
+
162
+ `CometChatMessageList` exposes exactly two factory APIs (`CometChatMessageList.kt:3376 / :3395`):
163
+
164
+ - `setBubbleFactories(factories: List<BubbleFactory>)` — sets the custom factory map
165
+ - `getBubbleFactories(): Map<String, BubbleFactory>` — returns an immutable copy
166
+
167
+ There is **NO** settable `bubbleFactories` property and **NO** `removeBubbleFactory(...)` on `CometChatMessageList` (`removeBubbleFactory` exists only on the internal `MessageAdapter`, `MessageAdapter.kt:1534` — not public API).
168
+
169
+ `setBubbleFactories` does NOT wipe built-in bubbles, because **built-in types are never stored as factory entries.** The adapter starts with an empty factory map (`MessageAdapter.kt:153` "The adapter starts with an empty bubbleFactories map"); when a message's `"category_type"` key has no factory, the bubble falls back to `InternalContentRenderer`. So passing only your custom factories is correct and safe:
170
+
171
+ ```kotlin
172
+ messageList.setBubbleFactories(listOf(
173
+ LocationBubbleFactory(), // custom_location
174
+ PaymentBubbleFactory() // custom_payment
175
+ ))
176
+ // text/image/video/etc. still render via InternalContentRenderer — untouched
177
+ ```
178
+
179
+ `setBubbleFactories` replaces the *custom* factory set, so include every custom factory you want active in the single list. `BubbleFactory.getKey(category, type)` and `BubbleFactory.getFactoryKey(message)` (companion, `BubbleFactory.kt:441 / :425`) are still available if you need the key string.
180
+
181
+ ### 1.9 Custom attachment options (Scenario 3)
182
+
183
+ `CometChatMessageComposer` exposes `addAttachmentOption(action)` (append one) and `setAttachmentOptions(list)` (set the custom list) — `CometChatMessageComposer.kt:4951 / :4930`, both delegate to the shared `CometChatMessageComposerViewModel`.
184
+
185
+ **Neither call drops the built-in options.** Both touch only the *custom* options list (`_customAttachmentOptions`); the defaults (camera/image/video/audio/document/poll/collab-doc/collab-whiteboard) are rebuilt every time by `getDefaultAttachmentOptions(...)` and the custom ones are appended at the end (`CometChatMessageComposerViewModel.kt:646-649`). So `setAttachmentOptions(listOf(location))` keeps the defaults too — it just replaces any *previously-set custom* options. Use `addAttachmentOption` to add one without disturbing other custom options:
186
+
187
+ ```kotlin
188
+ val location = CometChatMessageComposerAction(
189
+ id = "location",
190
+ title = "Send Location",
191
+ icon = R.drawable.ic_location,
192
+ onClick = OnClick { /* pick + send (see 1.10) */ }
193
+ )
194
+ messageComposer.addAttachmentOption(location) // appends one custom option
195
+ // setAttachmentOptions(listOf(location)) also keeps camera/image/etc. — it only resets the custom list
196
+ ```
197
+
198
+ > To hide a built-in option, use the composer visibility setters (e.g. `setPollOptionVisibility(View.GONE)`), which flip the `_show*Option` flags `getDefaultAttachmentOptions` checks. The built-in IDs are constants on `CometChatMessageComposerAction` (`ID_CAMERA`…`ID_COLLABORATIVE_WHITEBOARD`, `CometChatMessageComposerAction.kt:42-49`).
199
+
200
+ ### 1.10 Sending a custom message — use the UIKit path, not the raw SDK
201
+
202
+ ```kotlin
203
+ val message = CustomMessage(
204
+ receiverId,
205
+ CometChatConstants.RECEIVER_TYPE_USER, // or RECEIVER_TYPE_GROUP
206
+ "location", // matches the BubbleFactory type
207
+ customData // org.json.JSONObject
208
+ )
209
+ // ✅ kit path — sets muid + sender, fires ccMessageSent → list APPENDS
210
+ CometChatUIKit.sendCustomMessage(message, object : CometChat.CallbackListener<CustomMessage>() {
211
+ override fun onSuccess(p0: CustomMessage) {}
212
+ override fun onError(p0: CometChatException) {}
213
+ })
214
+ // ❌ CometChat.sendCustomMessage(...) — no muid/sender/event → recipient error + realtime replace
215
+ ```
216
+
217
+ Verified (v6 Kotlin Views): `CometChatMessageList.setBubbleFactories(List) / getBubbleFactories(): Map` (`CometChatMessageList.kt:3376 / :3395`), `CometChatMessageComposer.addAttachmentOption / setAttachmentOptions` (`:4951 / :4930`), `CometChatUIKit.sendCustomMessage(CustomMessage, CallbackListener)` (`CometChatUIKit.kt:472`). Note: `messageList.bubbleFactories = …` (property) and `CometChatMessageList.removeBubbleFactory(...)` are NOT public — do not use.
218
+
219
+ ### 1.11 Override an EXISTING type's bubble (Scenario 2)
220
+
221
+ To replace a built-in type's rendering, subclass `BubbleFactory` with `getCategory()`/`getType()` set to the built-in identifiers, then register it. As in §1.8, built-ins are not factory entries — a matching factory simply takes priority over `InternalContentRenderer`.
222
+
223
+ ```kotlin
224
+ import com.cometchat.chat.constants.CometChatConstants
225
+
226
+ class MyTextBubbleFactory : BubbleFactory() {
227
+ override fun getCategory(): String = CometChatConstants.CATEGORY_MESSAGE // "message"
228
+ override fun getType(): String = CometChatConstants.MESSAGE_TYPE_TEXT // "text"
229
+
230
+ override fun createContentView(context: Context): View = MyTextContentView(context)
231
+
232
+ override fun bindContentView(
233
+ view: View,
234
+ message: BaseMessage,
235
+ alignment: UIKitConstants.MessageBubbleAlignment,
236
+ holder: RecyclerView.ViewHolder?,
237
+ position: Int
238
+ ) {
239
+ (view as MyTextContentView).bind(message as TextMessage)
240
+ }
241
+ // …or override createBubbleView()/bindBubbleView() (see 1.3) to replace the whole bubble
242
+ }
243
+
244
+ messageList.setBubbleFactories(listOf(MyTextBubbleFactory()))
245
+ ```
246
+
247
+ Only `message_text` is overridden; other types keep their internal rendering.
248
+
249
+ ### 1.12 Add a long-press message option (Scenario 4 — Forward-style)
250
+
251
+ `CometChatMessageList` resolves the long-press option sheet through the shared view model. Two public setters control it (`CometChatMessageList.kt:3697 / :3709`):
252
+
253
+ - `setOptions(callback: (BaseMessage) -> List<CometChatMessageOption>?)` — **replaces** defaults when the callback returns non-null (return `null` to keep them); takes precedence over `addOptions`.
254
+ - `addOptions(callback: (BaseMessage) -> List<CometChatMessageOption>)` — **appends** after the defaults; invoked only when `setOptions` is unset or returns `null`.
255
+
256
+ Use `addOptions` so the built-in Reply/Copy/Edit/Delete survive:
257
+
258
+ ```kotlin
259
+ import com.cometchat.uikit.core.domain.model.CometChatMessageOption
260
+
261
+ messageList.addOptions { message -> // ✅ appended to defaults
262
+ listOf(
263
+ CometChatMessageOption(
264
+ id = "forward",
265
+ title = "Forward",
266
+ icon = R.drawable.ic_forward,
267
+ onClick = { /* open forward picker for `message` */ }
268
+ )
269
+ )
270
+ }
271
+ // ❌ messageList.setOptions { listOf(forward) } // would DROP reply/copy/edit/delete
272
+ ```
273
+
274
+ For the click handler use `setMessageOptionClickListener(MessageOptionClickListener)` (`CometChatMessageList.kt:3671`). Resolution order verified in `CometChatMessageListViewModel.resolveMessageOptions` (`:817-827`): `setOptions` non-null wins, else `defaultOptions + addOptions`. `CometChatMessageOption(id, title, …, onClick)` is a data class at `CometChatMessageOption.kt:21`.
275
+
276
+ ### 1.13 MessageTemplate via the DataSource (docs-taught alternative to BubbleFactory)
277
+
278
+ > ⚠️ **Verify before using — symbols not found in the GA v6 Kotlin-Views source.** `CometChatUIKit.getDataSource()`, `getMessageTemplates()`, `CometChatMessageTemplate`, `setTemplates(...)`, and `MessagesViewHolderListener` appear in the Android **docs** but are **absent from the verified `com.cometchat.uikit.kotlin` / `chatuikit-core` GA source** (they're the legacy `com.cometchat.chatuikit` v5-shaped API). Treat this section as a docs reference that may not compile against your installed v6 kit — **prefer `BubbleFactory` / `BubbleViewProvider` (the confirmed v6-native path) for all new code.**
279
+
280
+ The `BubbleFactory` / `BubbleViewProvider` surface above is the primary v6 customization path. The Android docs also teach a **`MessageTemplate`** path through the data source ([message-template](https://www.cometchat.com/docs/ui-kit/android/v6/message-template)) — fetch the existing templates, mutate the one you want via the `MessagesViewHolderListener` create/bind pair, then re-apply with `setTemplates(...)` (append, never replace with a single-item list):
281
+
282
+ ```kotlin
283
+ // 1. fetch existing templates from the data source
284
+ val templates = CometChatUIKit.getDataSource()
285
+ .getMessageTemplates(messageList.additionParameter)
286
+ .toMutableList()
287
+
288
+ // 2. mutate the matched template (or build a new one for a custom type)
289
+ templates.find { it.type == UIKitConstants.MessageType.TEXT }
290
+ ?.setContentView(object : MessagesViewHolderListener() {
291
+ override fun createView(context: Context, bubble: CometChatMessageBubble,
292
+ alignment: UIKitConstants.MessageBubbleAlignment): View =
293
+ LayoutInflater.from(context).inflate(R.layout.your_custom_layout, null)
294
+ override fun bindView(context: Context, view: View, message: BaseMessage,
295
+ alignment: UIKitConstants.MessageBubbleAlignment,
296
+ viewHolder: RecyclerView.ViewHolder, list: List<BaseMessage>, i: Int) { /* bind */ }
297
+ })
298
+ // new custom type:
299
+ val contact = CometChatMessageTemplate().apply {
300
+ setType("contact"); setCategory(UIKitConstants.MessageCategory.CUSTOM)
301
+ setContentView(/* MessagesViewHolderListener */)
302
+ }
303
+ templates.add(contact)
304
+
305
+ // 3. re-apply — Views uses setTemplates(...)
306
+ messageList.setTemplates(templates)
307
+ ```
308
+
309
+ Views templates expose listener-based slot setters (`setContentView`, `setHeaderView`, `setFooterView`, `setBottomView`, `setStatusInfoView`, `setBubbleView`, `setOptions`) mirroring §1.4's slots. Prefer `BubbleFactory` for new code; use `getMessageTemplates(...)` + `setTemplates(...)` when you want to start from the kit's defaults and tweak one type. (This overlaps the custom-message topic.)
310
+
159
311
  ## 2. BubbleViewProvider (Per-Slot Overrides)
160
312
 
161
313
  `BubbleViewProvider` is a simpler interface for overriding individual slots across ALL message types.
@@ -257,6 +409,21 @@ messageList.setStyle(style)
257
409
  | No bubble replacement | `createBubbleView()` for complete replacement |
258
410
  | Theme-level styling only | Per-factory `getBubbleStyle()` |
259
411
 
412
+ ## Text formatters (inline mentions / URLs / custom tokens)
413
+
414
+ Style/transform message text inline via `setTextFormatters(...)` on the composer and message list. The kit ships `CometChatMentionsFormatter` + `CometChatRichTextFormatter` (subclasses of the abstract `CometChatTextFormatter`) in `com.cometchat.uikit.kotlin.shared.formatters`. To ADD a custom one, include the defaults too (a bare list replaces them).
415
+
416
+ ```kotlin
417
+ import com.cometchat.uikit.kotlin.shared.formatters.CometChatMentionsFormatter
418
+ import com.cometchat.uikit.kotlin.shared.formatters.CometChatTextFormatter
419
+
420
+ val formatters = listOf<CometChatTextFormatter>(CometChatMentionsFormatter(context) /* , YourFormatter(context) */)
421
+ composer.setTextFormatters(formatters) // fun setTextFormatters(List<CometChatTextFormatter>?)
422
+ messageList.setTextFormatters(formatters)
423
+ ```
424
+
425
+ For a custom @/#/! token: subclass `CometChatTextFormatter(trackingCharacter)` and implement its `search()` + view hooks (the kit's `shared/formatters/README.md` shows the mentions example: `setMentionLimit` / `setMentionsType` / `setOnMentionClick` / `setMentionStyle`).
426
+
260
427
  ## Hard rules
261
428
 
262
429
  - BubbleFactory is an `abstract class` — extend it with `BubbleFactory()`
@@ -266,3 +433,7 @@ messageList.setStyle(style)
266
433
  - For per-type content customization, use BubbleFactory. For cross-type slot overrides, use BubbleViewProvider
267
434
  - `onViewRecycled()` is critical for cleaning up image loads, animations, or media playback
268
435
  - Do NOT confuse BubbleFactory (UI rendering) with DataSource (data fetching) — they are separate layers
436
+
437
+ ## Sound (in-app message + call sounds)
438
+
439
+ Sound is a customization sub-dimension. The UI Kit plays incoming/outgoing message + call sounds via `CometChatSoundManager` — mute it, swap custom audio, or play a specific sound. The full API + recipe lives in **`cometchat-android-v6-kotlin-theming`** (Sound section). Verify the access path against the installed kit before relying on it.
@@ -3,18 +3,19 @@ name: cometchat-android-v6-kotlin-placement
3
3
  description: "CometChat Android UIKit v6 Kotlin Views placement — Activity, Fragment, BottomSheet, Tab, and Intent navigation patterns"
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, placement, activity, fragment, navigation, tabs"
11
10
  ---
12
11
 
12
+ > **Ground truth:** `com.cometchat:chatuikit-kotlin-android:6.x` Views + `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 installed package/source before relying on them.
13
+
13
14
  > **Companion skills:** cometchat-android-v6-compose-placement (Compose equivalent), cometchat-android-v6-kotlin-components, cometchat-android-v6-kotlin-theming
14
15
 
15
16
  ## Purpose
16
17
 
17
- Place CometChat Kotlin Views components into Activities, Fragments, BottomSheets, and Tab layouts. Patterns derived from `master-app-kotlin`.
18
+ Place CometChat Kotlin Views components into Activities, Fragments, BottomSheets, and Tab layouts. Patterns derived from `sample-app-kotlin`.
18
19
 
19
20
  ## Use this skill when
20
21
 
@@ -50,7 +51,7 @@ class ConversationsActivity : AppCompatActivity() {
50
51
 
51
52
  ### 1.2 Messages Activity
52
53
 
53
- Pattern from `master-app-kotlin/appflow/MessagesActivity.kt`:
54
+ Pattern from `sample-app-kotlin/.../ui/messages/MessagesActivity.kt`:
54
55
 
55
56
  ```kotlin
56
57
  class MessagesActivity : AppCompatActivity() {
@@ -58,10 +59,21 @@ class MessagesActivity : AppCompatActivity() {
58
59
  super.onCreate(savedInstanceState)
59
60
  setContentView(R.layout.activity_messages)
60
61
 
62
+ // Pad the root for the status/navigation bars (root has fitsSystemWindows="true").
63
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.parent_view)) { view, insets ->
64
+ val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
65
+ view.setPadding(systemBars.left, systemBars.top, systemBars.right, 0)
66
+ insets
67
+ }
68
+
61
69
  val header = findViewById<CometChatMessageHeader>(R.id.messageHeader)
62
70
  val messageList = findViewById<CometChatMessageList>(R.id.messageList)
63
71
  val composer = findViewById<CometChatMessageComposer>(R.id.messageComposer)
64
72
 
73
+ // Show + wire the back button (the kit does not finish the Activity for you).
74
+ header.setBackButtonVisibility(View.VISIBLE)
75
+ header.setOnBackPress { finish() }
76
+
65
77
  // Set user or group
66
78
  header.setUser(user)
67
79
  messageList.setUser(user)
@@ -75,13 +87,16 @@ class MessagesActivity : AppCompatActivity() {
75
87
  }
76
88
  ```
77
89
 
78
- XML layout:
90
+ XML layout — the root carries `android:fitsSystemWindows="true"` (so the inset listener above receives system-bar insets) and `?attr/cometchatBackgroundColor1`:
79
91
 
80
92
  ```xml
81
93
  <?xml version="1.0" encoding="utf-8"?>
82
94
  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
95
+ android:id="@+id/parent_view"
83
96
  android:layout_width="match_parent"
84
97
  android:layout_height="match_parent"
98
+ android:background="?attr/cometchatBackgroundColor1"
99
+ android:fitsSystemWindows="true"
85
100
  android:orientation="vertical">
86
101
 
87
102
  <com.cometchat.uikit.kotlin.presentation.messageheader.ui.CometChatMessageHeader
@@ -192,7 +207,7 @@ dialog.show()
192
207
 
193
208
  ## 6. App Flow Pattern
194
209
 
195
- From `master-app-kotlin/appflow/DefaultComponentAppFlowActivity.kt` — a single Activity hosts the full chat flow with Fragment transactions:
210
+ Pattern from `sample-app-kotlin/.../ui/home/HomeActivity.kt` — a single Activity hosts the chat flow via Fragment transactions:
196
211
 
197
212
  ```kotlin
198
213
  class AppFlowActivity : AppCompatActivity() {
@@ -3,13 +3,14 @@ name: cometchat-android-v6-kotlin-theming
3
3
  description: "CometChat Android UIKit v6 Kotlin Views theming — CometChatTheme singleton, XML attributes, programmatic overrides, typography, and dark mode"
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.0"
10
9
  tags: "cometchat, android, kotlin-views, theming, xml-attrs, colors, typography, dark-mode"
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-compose-theming (Compose equivalent), cometchat-android-v6-kotlin-components, cometchat-android-v6-kotlin-customization
14
15
 
15
16
  ## Purpose
@@ -47,10 +48,14 @@ CometChatTheme.setErrorColor(Color.RED)
47
48
 
48
49
  ## 2. XML Theme Attributes
49
50
 
50
- Define theme colors in your app's `styles.xml` or `themes.xml`:
51
+ > **The app/activity theme MUST extend `CometChatTheme.DayNight` (required — components crash without it).** The kit ships `CometChatTheme.DayNight` (parent `Theme.MaterialComponents.DayNight.NoActionBar`), which defines every `cometchat*` theme attribute the component layouts reference. Parenting a plain `Theme.MaterialComponents` / `Theme.Material3` / `Theme.AppCompat` instead leaves those attrs unresolved and the **first component inflate crashes** — e.g. `CometChatConversations` (which inflates a `MaterialButton`/`MaterialCardView`) throws `java.lang.UnsupportedOperationException: Failed to resolve attribute …` or `IllegalArgumentException: requires your app theme to be Theme.MaterialComponents`. Set it in `AndroidManifest.xml` via `android:theme="@style/AppTheme"` (or `android:theme="@style/CometChatTheme.DayNight"` directly). Verified by building + running on-device, 2026-06-11.
52
+
53
+ Define theme colors in your app's `styles.xml` or `themes.xml`, parenting the kit theme:
51
54
 
52
55
  ```xml
53
- <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
56
+ <!-- parent MUST be CometChatTheme.DayNight (or a descendant) -->
57
+ <style name="AppTheme" parent="CometChatTheme.DayNight">
58
+ <!-- Override only what you want; the parent supplies all defaults. -->
54
59
  <!-- Primary -->
55
60
  <item name="cometchatPrimaryColor">#6851D6</item>
56
61
 
@@ -129,7 +134,7 @@ Extended primary colors auto-generate by blending primary with white (day) or bl
129
134
 
130
135
  All follow the same pattern: `get{Token}(ctx)` / `set{Token}(color)` / `cometchat{Token}` XML attr. Defaults fall back to neutral scale values if not explicitly set.
131
136
 
132
- Border color aliases: `getBorderColorLight()` = `getStrokeColorLight()`, etc.
137
+ Border color aliases: `getBorderColorLight()` = `getStrokeColorLight()`, `getBorderColorDefault()` = `getStrokeColorDefault()`, `getBorderColorDark()` = `getStrokeColorDark()`. Note: `StrokeColor` also has a `Highlight` variant (`getStrokeColorHighlight()`); there is **no** `getBorderColorHighlight()`.
133
138
 
134
139
  ## 4. Typography
135
140
 
@@ -138,7 +143,8 @@ Border color aliases: `getBorderColorLight()` = `getStrokeColorLight()`, etc.
138
143
  val titleBold: Int = CometChatTheme.getTextAppearanceTitleBold(context)
139
144
  val bodyRegular: Int = CometChatTheme.getTextAppearanceBodyRegular(context)
140
145
  val heading1Medium: Int = CometChatTheme.getTextAppearanceHeading1Medium(context)
141
- // ... all combinations: Title, Heading1-4, Body, Caption1-2, Button, Link × Regular/Medium/Bold
146
+ // ... combinations: Title, Heading1-4, Body, Caption1-2, Button each have Regular/Medium/Bold.
147
+ // Link is the exception — only getTextAppearanceLinkRegular(context) exists (no Medium/Bold).
142
148
 
143
149
  // Get font resource IDs
144
150
  val regularFont: Int = CometChatTheme.getFontRegular(context)
@@ -193,6 +199,31 @@ val black: Int = CometChatTheme.getColorBlack(context)
193
199
  val transparent: Int = CometChatTheme.getColorTransparent(context)
194
200
  ```
195
201
 
202
+ ## Localization
203
+
204
+ To translate the UI, switch the active language, or override individual strings, route to the dedicated **`cometchat-i18n`** skill — the canonical cross-family localization reference. Android uses `CometChatLocalize.setLocale(context, Language.Code.<lang>)` / `getLocale(context)` (a separate method, **not** an `init` object — unlike web/RN). `cometchat-i18n` covers bundled languages, custom translations, and RTL. Docs: https://www.cometchat.com/docs/ui-kit/android/localize
205
+
206
+ ## Sound Manager — custom notification & call sounds
207
+
208
+ Sounds are a **behavioral** customization — driven by `CometChatSoundManager`, an **instance** class that needs a `Context`. The UI Kit plays the built-in cues automatically; use this to override a cue with your own raw resource. V6 package (NOT the V5 `com.cometchat.chatuikit.*` path):
209
+
210
+ ```kotlin
211
+ import com.cometchat.uikit.core.resources.soundmanager.CometChatSoundManager
212
+ import com.cometchat.uikit.core.resources.soundmanager.Sound
213
+
214
+ val soundManager = CometChatSoundManager(context)
215
+
216
+ // Play a default cue — Sound enum is SCREAMING_SNAKE_CASE: INCOMING_CALL |
217
+ // OUTGOING_CALL | INCOMING_MESSAGE | INCOMING_MESSAGE_FROM_OTHER | OUTGOING_MESSAGE
218
+ soundManager.play(Sound.INCOMING_CALL)
219
+
220
+ // Override with your own raw resource (R.raw.*)
221
+ soundManager.play(Sound.INCOMING_MESSAGE, R.raw.my_ping)
222
+
223
+ // Stop whatever is playing
224
+ soundManager.pause()
225
+ ```
226
+
196
227
  ## Hard rules
197
228
 
198
229
  - ALWAYS pass a valid `Context` to getter methods — they resolve XML attributes from the theme
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: cometchat-android-v6-migration
3
- description: V5→V6 migration recipes for native Android. CometChat ships V5 (chat-uikit-android:5.x — Java + Kotlin Views) and V6 beta (chatuikit-{compose,kotlin}-android:6.x — Compose surface OR Kotlin Views, calls bundled) side-by-side. Covers when to migrate vs stay, the cohort-selection decision (Compose vs Kotlin Views on V6), gradle dependency rewrites, builder API changes (UIKitSettings replaces UIKitSettingsBuilder), theme system rewrite (CometChatTheme.DayNight), calls integration delta (calls bundled drop calls-sdk-android), Activity theme rules, side-by-side cohort selection during migration, and a verification checklist.
3
+ description: V5→V6 migration recipes for native Android. CometChat ships V5 (chat-uikit-android:5.x — Java + Kotlin Views) and V6 (chatuikit-{compose,kotlin}-android:6.x — GA 2026-05-25 — Compose surface OR Kotlin Views, calls bundled) side-by-side. Covers when to migrate vs stay, the cohort-selection decision (Compose vs Kotlin Views on V6), gradle dependency rewrites, builder API changes (UIKitSettings replaces UIKitSettingsBuilder), theme system rewrite (CometChatTheme.DayNight), calls integration delta (calling UI bundled, but calls-sdk-android:5.0.+ is still a required peer dep), Activity theme rules, side-by-side cohort selection during migration, and a verification checklist.
4
4
  license: "MIT"
5
- compatibility: "Migrating FROM com.cometchat:chat-uikit-android:5.x TO com.cometchat:chatuikit-{compose,kotlin}-android:6.0.0-beta2; minSdk 28+ (V6 raised the floor from 21 to 28); Kotlin >= 1.9 for V6 Compose"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
5
+ compatibility: "Migrating FROM com.cometchat:chat-uikit-android:5.x TO com.cometchat:chatuikit-{compose,kotlin}-android:6.0.+; minSdk 28+ (V6 raised the floor from 21 to 28); Kotlin >= 1.9 for V6 Compose"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "4.0.0"
@@ -12,7 +11,7 @@ metadata:
12
11
 
13
12
  ## Purpose
14
13
 
15
- Migration recipes for moving from CometChat Android UIKit V5 (`chat-uikit-android:5.x`) to V6 (`chatuikit-{compose,kotlin}-android:6.0.0-beta2`). V6 is stable (GA 2026-05-25) most production apps should stay on V5 today; this skill is for teams evaluating V6 or planning the eventual migration.
14
+ Migration recipes for moving from CometChat Android UIKit V5 (`chat-uikit-android:5.x`) to V6 (`chatuikit-{compose,kotlin}-android:6.0.+`). V6 is stable (GA 2026-05-25) and the recommended target for new apps; existing V5 apps can migrate when ready there's no forced timeline, and V5 remains supported. This skill covers both the decision and the mechanics.
16
15
 
17
16
  V6 is a different SDK, not a drop-in replacement. The migration is roughly the size of jumping from React Native UIKit v5 to v6 — package coordinates, builder APIs, theme system, calls handling all change.
18
17
 
@@ -23,9 +22,9 @@ V6 is a different SDK, not a drop-in replacement. The migration is roughly the s
23
22
  - `cometchat-android-v6-{compose,kotlin}-{components,placement,theming,customization}` — surface-specific destination skills
24
23
  - `cometchat-android-v6-calls` — calls migration (calls SDK is bundled in V6)
25
24
 
26
- **Ground truth:**
25
+ **Ground truth:** **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).
27
26
  - V5 source — installed `com.cometchat:chat-uikit-android@5.x` artifacts under `~/.gradle/caches/`
28
- - V6 source — installed `chatuikit-{compose,kotlin}-android@6.0.0-beta2` artifacts
27
+ - V6 source — installed `chatuikit-{compose,kotlin}-android@6.0.+` artifacts
29
28
  - Sister skill — `cometchat-flutter-v6-migration` (different platform, same migration shape)
30
29
 
31
30
  ---
@@ -44,7 +43,7 @@ V6 is a different SDK, not a drop-in replacement. The migration is roughly the s
44
43
  - You're starting a new project
45
44
  - You're rewriting your existing app's UI to Compose anyway
46
45
  - You need V6 features that aren't backported to V5 (e.g. some AI Agent components)
47
- - You've validated V6 beta against your use cases on a sample project first
46
+ - You've validated V6 against your use cases on a sample project first
48
47
 
49
48
  **The dispatcher (`cometchat-android-v6`) routes by detected version.** Both V5 and V6 skill sets ship in `npx @cometchat/skills add --family android` — the migration here lives under V6 because that's the destination cohort.
50
49
 
@@ -56,8 +55,8 @@ V6 is split into two surfaces:
56
55
 
57
56
  | Surface | Package | When to pick |
58
57
  |---|---|---|
59
- | Compose | `com.cometchat:chatuikit-compose-android:6.0.0-beta2` | New apps; existing apps already on Compose |
60
- | Kotlin Views | `com.cometchat:chatuikit-kotlin-android:6.0.0-beta2` | Existing apps on Java + XML layouts; teams not ready for Compose |
58
+ | Compose | `com.cometchat:chatuikit-compose-android:6.0.+` | New apps; existing apps already on Compose |
59
+ | Kotlin Views | `com.cometchat:chatuikit-kotlin-android:6.0.+` | Existing apps on Java + XML layouts; teams not ready for Compose |
61
60
 
62
61
  **You can mix both in the same app**, but a single chat surface is one or the other — not both.
63
62
 
@@ -81,7 +80,7 @@ dependencies {
81
80
 
82
81
  ```kotlin
83
82
  dependencies {
84
- implementation("com.cometchat:chatuikit-compose-android:6.0.0-beta2")
83
+ implementation("com.cometchat:chatuikit-compose-android:6.0.+")
85
84
  // No separate calls SDK — calls bundled into the same artifact
86
85
  // Compose dependencies (if not already present)
87
86
  implementation(platform("androidx.compose:compose-bom:2024.02.00"))
@@ -95,7 +94,7 @@ dependencies {
95
94
 
96
95
  ```kotlin
97
96
  dependencies {
98
- implementation("com.cometchat:chatuikit-kotlin-android:6.0.0-beta2")
97
+ implementation("com.cometchat:chatuikit-kotlin-android:6.0.+")
99
98
  // No separate calls SDK
100
99
  // Material Components for theming (`CometChatTheme.DayNight` extends Material themes)
101
100
  implementation("com.google.android.material:material:1.11.+")
@@ -135,30 +134,28 @@ CometChatUIKit.init(this, settings, object : CometChat.CallbackListener<String>(
135
134
  })
136
135
  ```
137
136
 
138
- ### V6 — `UIKitSettings.Builder()`
137
+ ### V6 — `UIKitSettings.UIKitSettingsBuilder()`
139
138
 
140
139
  ```kotlin
141
- val settings = UIKitSettings.Builder()
140
+ val settings = UIKitSettings.UIKitSettingsBuilder()
142
141
  .setAppId(BuildConfig.COMETCHAT_APP_ID)
143
142
  .setRegion(BuildConfig.COMETCHAT_REGION)
144
143
  .setAuthKey(BuildConfig.COMETCHAT_AUTH_KEY)
145
144
  .subscribePresenceForAllUsers()
146
- .enableCalling() // ← calls toggled on here, not via separate SDK
145
+ .setEnableCalling(true) // ← calls toggled on here, not via separate SDK
147
146
  .build()
148
147
 
149
- CometChatUIKit.init(this, settings) { result ->
150
- when (result) {
151
- is CometChatUIKit.Result.Success -> { /* ... */ }
152
- is CometChatUIKit.Result.Error -> { /* surface to UI */ }
153
- }
154
- }
148
+ CometChatUIKit.init(this, settings, object : CometChat.CallbackListener<String>() {
149
+ override fun onSuccess(result: String) { /* ... */ }
150
+ override fun onError(e: CometChatException) { /* surface to UI */ }
151
+ })
155
152
  ```
156
153
 
157
154
  Differences:
158
155
 
159
- - Class name: `UIKitSettingsBuilder` `UIKitSettings.Builder()`
160
- - Calls: separate SDK init → `.enableCalling()` flag
161
- - Result: `CallbackListener` `Result.Success` / `Result.Error` sealed class
156
+ - Builder: unchanged both V5 and V6 use `UIKitSettings.UIKitSettingsBuilder()` (nested class)
157
+ - Calls: separate SDK init → `.setEnableCalling(true)` flag on the builder
158
+ - Result handling: unchanged — `init()`/`login()` still take `CometChat.CallbackListener<T>` (onSuccess/onError). There is **no** `Result.Success`/`Result.Error` sealed class in V6.
162
159
 
163
160
  For full builder option mapping, see `cometchat-android-v6-builder-settings`.
164
161
 
@@ -166,7 +163,7 @@ For full builder option mapping, see `cometchat-android-v6-builder-settings`.
166
163
 
167
164
  ## 5. Calls integration migration
168
165
 
169
- V5 has a separate `calls-sdk-android` artifact + a separate `CometChatCalls.init`. V6 bundles calls into `chatuikit-{compose,kotlin}-android` and toggles via `.enableCalling()`.
166
+ V5 has a separate `calls-sdk-android` artifact + a separate `CometChatCalls.init`. V6 bundles calls into `chatuikit-{compose,kotlin}-android` and toggles via `.setEnableCalling(true)`.
170
167
 
171
168
  ### V5 calls init
172
169
 
@@ -184,12 +181,17 @@ CometChatCalls.init(this, callAppSettings, /* callback */)
184
181
  ### V6 calls init
185
182
 
186
183
  ```kotlin
187
- val settings = UIKitSettings.Builder()
184
+ val settings = UIKitSettings.UIKitSettingsBuilder()
188
185
  // ... appId, region, authKey ...
189
- .enableCalling() // ← that's it; calls SDK init happens internally
186
+ .setEnableCalling(true) // ← that's it; calls SDK init happens internally
190
187
  .build()
191
188
 
192
- CometChatUIKit.init(this, settings) { /* ... */ }
189
+ // init takes a CometChat.CallbackListener<String> (an abstract class NOT a
190
+ // fun interface), so use the object form, not a trailing lambda.
191
+ CometChatUIKit.init(this, settings, object : CometChat.CallbackListener<String>() {
192
+ override fun onSuccess(result: String) { /* ready */ }
193
+ override fun onError(e: CometChatException) { /* handle */ }
194
+ })
193
195
  ```
194
196
 
195
197
  ### Permissions + manifest carry over
@@ -255,7 +257,7 @@ This is documented in `cometchat-android-v6-troubleshooting` and surfaced in the
255
257
  1. Audit V5 theme attrs (`grep cometchat res/values/`)
256
258
  2. Map each to its V6 equivalent (most are same names; some have been renamed for Material 3 alignment)
257
259
  3. Activity manifest: change `android:theme="@style/Theme.AppCompat.*"` → `android:theme="@style/Theme.YourApp"` where the new theme inherits `CometChatTheme.DayNight`
258
- 4. Programmatic theme overrides: rewrite via Compose `CometChatTheme(colorScheme = ...)` or Kotlin Views `CometChatTheme.singleton.colors.primary = ...` (depending on surface)
260
+ 4. Programmatic theme overrides: rewrite via Compose `CometChatTheme(colorScheme = ...)` or Kotlin Views `CometChatTheme.setPrimaryColor(...)` (the `CometChatTheme` object exposes `setPrimaryColor`/`setExtendedPrimaryColor*`/`setNeutralColor*` etc. — there is no `.singleton.colors` field; depends on surface)
259
261
 
260
262
  For full mapping, see `cometchat-android-v6-{compose,kotlin}-theming`.
261
263
 
@@ -275,24 +277,24 @@ import com.cometchat.chatuikit.messages.CometChatMessageList
275
277
  ### V6 Compose imports
276
278
 
277
279
  ```kotlin
278
- import com.cometchat.chatuikit.compose.conversations.CometChatConversations
279
- import com.cometchat.chatuikit.compose.messages.CometChatMessageList
280
+ import com.cometchat.uikit.compose.presentation.conversations.ui.CometChatConversations
281
+ import com.cometchat.uikit.compose.presentation.messagelist.ui.CometChatMessageList
280
282
  ```
281
283
 
282
284
  ### V6 Kotlin Views imports
283
285
 
284
286
  ```kotlin
285
- import com.cometchat.chatuikit.kotlin.conversations.CometChatConversations
286
- import com.cometchat.chatuikit.kotlin.messages.CometChatMessageList
287
+ import com.cometchat.uikit.kotlin.presentation.conversations.ui.CometChatConversations
288
+ import com.cometchat.uikit.kotlin.presentation.messagelist.ui.CometChatMessageList
287
289
  ```
288
290
 
289
- The skill rewrites imports during migration. Most projects can do a regex sweep:
291
+ The skill rewrites imports during migration. The V6 namespace is `com.cometchat.uikit.{compose,kotlin}.presentation.<feature>.ui` — NOT the V5 `com.cometchat.chatuikit.*`. Most projects can do a regex sweep:
290
292
 
291
293
  ```bash
292
294
  # Compose path
293
- sed -i 's|com.cometchat.chatuikit.conversations|com.cometchat.chatuikit.compose.conversations|g' app/src/main/kotlin/**/*.kt
295
+ sed -i -E 's|com.cometchat.chatuikit.([a-z]+)|com.cometchat.uikit.compose.presentation.\1.ui|g' app/src/main/kotlin/**/*.kt
294
296
  # Kotlin Views path
295
- sed -i 's|com.cometchat.chatuikit.conversations|com.cometchat.chatuikit.kotlin.conversations|g' app/src/main/kotlin/**/*.kt
297
+ sed -i -E 's|com.cometchat.chatuikit.([a-z]+)|com.cometchat.uikit.kotlin.presentation.\1.ui|g' app/src/main/kotlin/**/*.kt
296
298
  ```
297
299
 
298
300
  But verify each rewrite — some V5 modules have been split or merged in V6 in ways the agent should review case-by-case.
@@ -326,14 +328,14 @@ For an in-progress migration, you can have V5 and V6 in the same module temporar
326
328
 
327
329
  □ Update gradle
328
330
  □ Remove chat-uikit-android:5.x
329
- □ KEEP calls-sdk-android:5.0.+ (V6 needs it as peer dep — see §"Drop the calls-sdk-android dependency" above)
330
- □ Add chatuikit-{compose,kotlin}-android:6.0.0-beta2
331
+ □ KEEP calls-sdk-android:5.0.+ (V6 needs it as peer dep — see §"KEEP calls-sdk-android:5.0.+" above)
332
+ □ Add chatuikit-{compose,kotlin}-android:6.0.+
331
333
  □ Add Compose deps (if applicable) or Material Components (if Kotlin Views)
332
334
 
333
335
  □ Rewrite init
334
- □ UIKitSettingsBuilder → UIKitSettings.Builder()
335
- □ Drop separate CometChatCalls.init; add .enableCalling() on UIKitSettings
336
- □ CallbackListener Result sealed class
336
+ □ UIKitSettingsBuilder → UIKitSettings.UIKitSettingsBuilder()
337
+ □ Drop separate CometChatCalls.init; add .setEnableCalling(true) on UIKitSettings
338
+ init callback stays CometChat.CallbackListener<String> (V6 did NOT switch to a Result/sealed-class API)
337
339
 
338
340
  □ Rewrite themes
339
341
  □ Activity theme parent → CometChatTheme.DayNight (Kotlin Views)
@@ -379,8 +381,8 @@ For an in-progress migration, you can have V5 and V6 in the same module temporar
379
381
  - [ ] `app/build.gradle.kts` has only one CometChat dep tree (V5 OR V6, not both)
380
382
  - [ ] `minSdk = 28` or higher
381
383
  - [ ] All V5 imports rewritten to the V6 surface (`compose` or `kotlin` namespace)
382
- - [ ] `UIKitSettingsBuilder` → `UIKitSettings.Builder()` everywhere
383
- - [ ] `.enableCalling()` on the builder if calls are used
384
+ - [ ] `UIKitSettingsBuilder` → `UIKitSettings.UIKitSettingsBuilder()` everywhere
385
+ - [ ] `.setEnableCalling(true)` on the builder if calls are used
384
386
  - [ ] Activity themes inherit `CometChatTheme.DayNight` (Kotlin Views path)
385
387
  - [ ] No `CometChatCalls.init` calls outside what V6 does internally
386
388
  - [ ] `calls-sdk-android:5.0.+` retained as explicit peer dep (V6 needs it; despite vendor marketing of "bundled calls")
@@ -3,13 +3,14 @@ name: cometchat-android-v6-production
3
3
  description: "CometChat Android UIKit v6 production readiness — token auth, ProGuard/R8, security checklist, release configuration"
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, production, security, proguard, release, auth-token"
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/user-auth · **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-builder-settings (UIKitSettings), cometchat-android-v6-push (FCM)
14
15
 
15
16
  ## Purpose
@@ -165,11 +166,13 @@ implementation("androidx.compose.material3:material3")
165
166
  Pin CometChat SDK versions explicitly:
166
167
 
167
168
  ```kotlin
168
- implementation("com.cometchat:chatuikit-compose-android:6.0.0-beta2")
169
+ implementation("com.cometchat:chatuikit-compose-android:6.0.+")
169
170
  // or
170
- implementation("com.cometchat:chatuikit-kotlin-android:6.0.0-beta2")
171
+ implementation("com.cometchat:chatuikit-kotlin-android:6.0.+")
171
172
  ```
172
173
 
174
+ > Never pin `6.0.0-beta2` (or any `-beta` preview) in a production build — V6 went GA on 2026-05-25. The `6.0.+` dynamic pin tracks GA patches forward (ENG-35701). Pin an exact GA patch (e.g. `6.0.1`) if your release process requires reproducible builds.
175
+
173
176
  ## 6. minSdk 28 Implications
174
177
 
175
178
  v6 requires `minSdk = 28` (Android 9.0 Pie). This means: