@cometchat/skills 4.4.2 → 5.0.0

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 (490) hide show
  1. package/.claude-plugin/marketplace.json +55 -0
  2. package/.claude-plugin/plugin.json +14 -0
  3. package/CHANGELOG.md +36 -0
  4. package/LICENSE +21 -0
  5. package/README.md +41 -163
  6. package/RULES.md +114 -0
  7. package/bin/cometchat-skills.mjs +1180 -0
  8. package/bin/legacy-skills.json +95 -0
  9. package/catalogs/android-v6.json +1646 -0
  10. package/catalogs/flutter-v6.json +651 -0
  11. package/catalogs/ios-v5.json +1383 -0
  12. package/catalogs/rn-calls-v5.json +134 -0
  13. package/catalogs/rn-calls-v5.symbols.txt +58 -0
  14. package/catalogs/rn-sdk-v4.json +672 -0
  15. package/catalogs/rn-v5.json +449 -0
  16. package/catalogs/rn-v5.symbols.txt +216 -0
  17. package/catalogs/sdk-android-v5.json +514 -0
  18. package/contracts.android-calls-v5.json +122 -0
  19. package/contracts.android-v6.json +135 -0
  20. package/contracts.angular-v5.json +694 -0
  21. package/contracts.flutter-calls-v5.json +77 -0
  22. package/contracts.flutter-v6.json +126 -0
  23. package/contracts.ios-calls-v5.json +67 -0
  24. package/contracts.ios-v5.json +436 -0
  25. package/contracts.json +82 -0
  26. package/contracts.rn-calls-v5.json +77 -0
  27. package/contracts.rn-v5.json +727 -0
  28. package/contracts.sdk-android-v5.json +15 -0
  29. package/contracts.web-calls-v5.json +45 -0
  30. package/features.android-calls-v5.json +246 -0
  31. package/features.android-v6.json +65 -0
  32. package/features.angular-v5.json +521 -0
  33. package/features.flutter-calls-v5.json +286 -0
  34. package/features.flutter-v6.json +484 -0
  35. package/features.ios-calls-v5.json +236 -0
  36. package/features.ios-v5.json +573 -0
  37. package/features.json +61 -0
  38. package/features.rn-calls-v5.json +187 -0
  39. package/features.rn-v5.json +614 -0
  40. package/features.sdk-android-v5.json +40 -0
  41. package/features.sdk-jsv4.json +24 -0
  42. package/features.web-calls-v5.json +108 -0
  43. package/package.json +151 -74
  44. package/peers.yaml +312 -0
  45. package/registry/README.md +31 -0
  46. package/registry/android-calls-v5.json +54 -0
  47. package/registry/android-v6.json +137 -0
  48. package/registry/angular-v5.json +114 -0
  49. package/registry/flutter-calls-v5.json +54 -0
  50. package/registry/flutter-v6.json +119 -0
  51. package/registry/ios-calls-v5.json +59 -0
  52. package/registry/ios-v5.json +97 -0
  53. package/registry/rn-calls-v5.json +59 -0
  54. package/registry/rn-v5.json +129 -0
  55. package/registry/sdk-android-v5.json +53 -0
  56. package/registry/sdk-jsv4.json +53 -0
  57. package/registry/web-calls-v5.json +54 -0
  58. package/registry/web-v7.json +99 -0
  59. package/skills/cometchat/SKILL.md +42 -2096
  60. package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
  61. package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
  62. package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
  63. package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
  64. package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
  65. package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
  66. package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
  67. package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
  68. package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
  69. package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
  70. package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
  71. package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
  72. package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
  73. package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
  74. package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
  75. package/skills/cometchat-android-v6-core/SKILL.md +236 -672
  76. package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
  77. package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
  78. package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
  79. package/skills/cometchat-android-v6-core/references/layout.md +112 -0
  80. package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
  81. package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
  82. package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
  83. package/skills/cometchat-android-v6-events/SKILL.md +46 -184
  84. package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
  85. package/skills/cometchat-android-v6-features/SKILL.md +74 -143
  86. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
  87. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
  88. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
  89. package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
  90. package/skills/cometchat-android-v6-production/SKILL.md +40 -179
  91. package/skills/cometchat-android-v6-push/SKILL.md +39 -289
  92. package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
  93. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
  94. package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
  95. package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
  96. package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
  97. package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
  98. package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
  99. package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
  100. package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
  101. package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
  102. package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
  103. package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
  104. package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
  105. package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
  106. package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
  107. package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
  108. package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
  109. package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
  110. package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
  111. package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
  112. package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
  113. package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
  114. package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
  115. package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
  116. package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
  117. package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
  118. package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
  119. package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
  120. package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
  121. package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
  122. package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
  123. package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
  124. package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
  125. package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
  126. package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
  127. package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
  129. package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
  130. package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
  131. package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
  132. package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
  133. package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
  134. package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
  135. package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
  136. package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
  137. package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
  138. package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
  139. package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
  140. package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
  141. package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
  142. package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
  143. package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
  144. package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
  145. package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
  146. package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
  147. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
  148. package/skills/cometchat-ios-calls/SKILL.md +112 -563
  149. package/skills/cometchat-ios-components/SKILL.md +44 -834
  150. package/skills/cometchat-ios-core/SKILL.md +181 -1068
  151. package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
  152. package/skills/cometchat-ios-core/references/docs-map.md +123 -0
  153. package/skills/cometchat-ios-core/references/install.md +23 -0
  154. package/skills/cometchat-ios-core/references/layout.md +186 -0
  155. package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
  156. package/skills/cometchat-ios-core/references/swiftui.md +91 -0
  157. package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
  158. package/skills/cometchat-ios-customization/SKILL.md +33 -968
  159. package/skills/cometchat-ios-features/SKILL.md +29 -738
  160. package/skills/cometchat-ios-migration/SKILL.md +39 -0
  161. package/skills/cometchat-ios-placement/SKILL.md +51 -729
  162. package/skills/cometchat-ios-push/SKILL.md +24 -602
  163. package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
  164. package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
  165. package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
  166. package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
  167. package/skills/cometchat-onboarding/SKILL.md +89 -0
  168. package/skills/cometchat-onboarding/references/archetypes.md +51 -0
  169. package/skills/cometchat-onboarding/references/calling-first.md +77 -0
  170. package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
  171. package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
  172. package/skills/cometchat-onboarding/references/platforms.md +90 -0
  173. package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
  174. package/skills/cometchat-react-native-calls/SKILL.md +200 -0
  175. package/skills/cometchat-react-native-components/SKILL.md +142 -0
  176. package/skills/cometchat-react-native-core/SKILL.md +313 -0
  177. package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
  178. package/skills/cometchat-react-native-core/references/component-props.md +105 -0
  179. package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
  180. package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
  181. package/skills/cometchat-react-native-core/references/layout.md +61 -0
  182. package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
  183. package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
  184. package/skills/cometchat-react-native-customization/SKILL.md +198 -0
  185. package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
  186. package/skills/cometchat-react-native-features/SKILL.md +122 -0
  187. package/skills/cometchat-react-native-migration/SKILL.md +103 -0
  188. package/skills/cometchat-react-native-placement/SKILL.md +158 -0
  189. package/skills/cometchat-react-native-production/SKILL.md +78 -0
  190. package/skills/cometchat-react-native-push/SKILL.md +88 -0
  191. package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
  192. package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
  193. package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
  194. package/skills/cometchat-react-native-testing/SKILL.md +94 -0
  195. package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
  196. package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
  197. package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
  198. package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
  199. package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
  200. package/skills/cometchat-react-v7-components/SKILL.md +72 -0
  201. package/skills/cometchat-react-v7-core/SKILL.md +101 -0
  202. package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
  203. package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
  204. package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
  205. package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
  206. package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
  207. package/skills/cometchat-react-v7-core/references/layout.md +158 -0
  208. package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
  209. package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
  210. package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
  211. package/skills/cometchat-react-v7-core/references/theming.md +52 -0
  212. package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
  213. package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
  214. package/skills/cometchat-react-v7-features/SKILL.md +92 -0
  215. package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
  216. package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
  217. package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
  218. package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
  219. package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
  220. package/skills/cometchat-react-v7-push/SKILL.md +53 -0
  221. package/test-suite/README.md +70 -0
  222. package/test-suite/catalogs/android-calls-v5.json +830 -0
  223. package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
  224. package/test-suite/catalogs/android-v6.json +1646 -0
  225. package/test-suite/catalogs/android-v6.symbols.txt +298 -0
  226. package/test-suite/catalogs/angular-v5.json +7587 -0
  227. package/test-suite/catalogs/flutter-calls-v5.json +196 -0
  228. package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
  229. package/test-suite/catalogs/flutter-v6.json +651 -0
  230. package/test-suite/catalogs/ios-calls-v5.json +158 -0
  231. package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
  232. package/test-suite/catalogs/ios-v5.json +1383 -0
  233. package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
  234. package/test-suite/catalogs/rn-calls-v5.json +134 -0
  235. package/test-suite/catalogs/rn-sdk-v4.json +672 -0
  236. package/test-suite/catalogs/rn-v5.json +449 -0
  237. package/test-suite/catalogs/sdk-android-v5.json +514 -0
  238. package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
  239. package/test-suite/catalogs/sdk-jsv4.json +800 -0
  240. package/test-suite/catalogs/web-calls-v5.json +195 -0
  241. package/test-suite/catalogs/web-v7.json +1243 -0
  242. package/test-suite/scripts/build-registry.mjs +113 -0
  243. package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
  244. package/test-suite/scripts/catalog-refresh.mjs +100 -0
  245. package/test-suite/scripts/lint-skills.mjs +909 -0
  246. package/test-suite/scripts/measure-tokens.mjs +169 -0
  247. package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
  248. package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
  249. package/test-suite/scripts/typecheck-fences.mjs +206 -0
  250. package/test-suite/scripts/verify-catalog.mjs +242 -0
  251. package/test-suite/scripts/verify-contract-fences.mjs +94 -0
  252. package/test-suite/scripts/verify-detection.mjs +178 -0
  253. package/test-suite/scripts/verify-docs-base.mjs +91 -0
  254. package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
  255. package/test-suite/scripts/verify-golden-path.mjs +138 -0
  256. package/test-suite/scripts/verify-oracle-components.mjs +133 -0
  257. package/test-suite/scripts/verify-template-bindings.mjs +148 -0
  258. package/test-suite/typecheck/angular-v5/package.json +21 -0
  259. package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
  260. package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
  261. package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
  262. package/test-suite/typecheck/web-v7/package.json +18 -0
  263. package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
  264. package/bin/install.js +0 -1003
  265. package/skills/.claude-plugin/marketplace.json +0 -86
  266. package/skills/cometchat/references/asking-questions.md +0 -48
  267. package/skills/cometchat-a11y/SKILL.md +0 -477
  268. package/skills/cometchat-android-v5/SKILL.md +0 -121
  269. package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
  270. package/skills/cometchat-android-v5-calls/references/README.md +0 -53
  271. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
  272. package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
  273. package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
  274. package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
  275. package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
  276. package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
  277. package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
  278. package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
  279. package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
  280. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
  281. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
  282. package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
  283. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
  284. package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
  285. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
  286. package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
  287. package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
  288. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
  289. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
  290. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
  291. package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
  292. package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
  293. package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
  294. package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
  295. package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
  296. package/skills/cometchat-android-v5-components/SKILL.md +0 -431
  297. package/skills/cometchat-android-v5-core/SKILL.md +0 -486
  298. package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
  299. package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
  300. package/skills/cometchat-android-v5-features/SKILL.md +0 -131
  301. package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
  302. package/skills/cometchat-android-v5-production/SKILL.md +0 -95
  303. package/skills/cometchat-android-v5-push/SKILL.md +0 -619
  304. package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
  305. package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
  306. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
  307. package/skills/cometchat-android-v6/SKILL.md +0 -108
  308. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
  309. package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
  310. package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
  311. package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
  312. package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
  313. package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
  314. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
  315. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
  316. package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
  317. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
  318. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
  319. package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
  320. package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
  321. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
  322. package/skills/cometchat-angular-calls/SKILL.md +0 -380
  323. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
  324. package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
  325. package/skills/cometchat-angular-calls/references/call-session.md +0 -167
  326. package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
  327. package/skills/cometchat-angular-calls/references/device-management.md +0 -154
  328. package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
  329. package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
  330. package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
  331. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
  332. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
  333. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
  334. package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
  335. package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
  336. package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
  337. package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
  338. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
  339. package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
  340. package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
  341. package/skills/cometchat-angular-components/SKILL.md +0 -235
  342. package/skills/cometchat-angular-core/SKILL.md +0 -386
  343. package/skills/cometchat-angular-customization/SKILL.md +0 -616
  344. package/skills/cometchat-angular-features/SKILL.md +0 -329
  345. package/skills/cometchat-angular-patterns/SKILL.md +0 -256
  346. package/skills/cometchat-angular-placement/SKILL.md +0 -314
  347. package/skills/cometchat-angular-production/SKILL.md +0 -564
  348. package/skills/cometchat-angular-push/SKILL.md +0 -389
  349. package/skills/cometchat-angular-testing/SKILL.md +0 -605
  350. package/skills/cometchat-angular-theming/SKILL.md +0 -290
  351. package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
  352. package/skills/cometchat-astro-patterns/SKILL.md +0 -708
  353. package/skills/cometchat-calls/SKILL.md +0 -364
  354. package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
  355. package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
  356. package/skills/cometchat-calls/references/use-case-support.md +0 -189
  357. package/skills/cometchat-calls/references/use-case-team.md +0 -180
  358. package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
  359. package/skills/cometchat-components/SKILL.md +0 -1142
  360. package/skills/cometchat-core/SKILL.md +0 -1048
  361. package/skills/cometchat-customization/SKILL.md +0 -580
  362. package/skills/cometchat-customization/references/component-catalog.md +0 -236
  363. package/skills/cometchat-features/SKILL.md +0 -861
  364. package/skills/cometchat-flutter-v5/SKILL.md +0 -173
  365. package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
  366. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
  367. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
  368. package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
  369. package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
  370. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
  371. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
  372. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
  373. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
  374. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
  375. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
  376. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
  377. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
  378. package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
  379. package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
  380. package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
  381. package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
  382. package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
  383. package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
  384. package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
  385. package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
  386. package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
  387. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
  388. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
  389. package/skills/cometchat-flutter-v6/SKILL.md +0 -446
  390. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
  391. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
  392. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
  393. package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
  394. package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
  395. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
  396. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
  397. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
  398. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
  399. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
  400. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
  401. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
  402. package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
  403. package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
  404. package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
  405. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
  406. package/skills/cometchat-i18n/SKILL.md +0 -419
  407. package/skills/cometchat-ios/SKILL.md +0 -325
  408. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
  409. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
  410. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
  411. package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
  412. package/skills/cometchat-ios-calls/references/call-session.md +0 -218
  413. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
  414. package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
  415. package/skills/cometchat-ios-calls/references/device-management.md +0 -171
  416. package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
  417. package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
  418. package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
  419. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
  420. package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
  421. package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
  422. package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
  423. package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
  424. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
  425. package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
  426. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
  427. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
  428. package/skills/cometchat-ios-production/SKILL.md +0 -738
  429. package/skills/cometchat-ios-testing/SKILL.md +0 -376
  430. package/skills/cometchat-ios-theming/SKILL.md +0 -667
  431. package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
  432. package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
  433. package/skills/cometchat-native-calls/SKILL.md +0 -671
  434. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
  435. package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
  436. package/skills/cometchat-native-calls/references/call-session.md +0 -182
  437. package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
  438. package/skills/cometchat-native-calls/references/device-management.md +0 -158
  439. package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
  440. package/skills/cometchat-native-calls/references/group-calls.md +0 -296
  441. package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
  442. package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
  443. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
  444. package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
  445. package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
  446. package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
  447. package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
  448. package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
  449. package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
  450. package/skills/cometchat-native-calls/references/share-invite.md +0 -146
  451. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
  452. package/skills/cometchat-native-components/SKILL.md +0 -628
  453. package/skills/cometchat-native-core/SKILL.md +0 -679
  454. package/skills/cometchat-native-customization/SKILL.md +0 -716
  455. package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
  456. package/skills/cometchat-native-features/SKILL.md +0 -638
  457. package/skills/cometchat-native-placement/SKILL.md +0 -509
  458. package/skills/cometchat-native-production/SKILL.md +0 -700
  459. package/skills/cometchat-native-push/SKILL.md +0 -594
  460. package/skills/cometchat-native-testing/SKILL.md +0 -582
  461. package/skills/cometchat-native-theming/SKILL.md +0 -681
  462. package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
  463. package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
  464. package/skills/cometchat-placement/SKILL.md +0 -1360
  465. package/skills/cometchat-production/SKILL.md +0 -1027
  466. package/skills/cometchat-react-calls/SKILL.md +0 -752
  467. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
  468. package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
  469. package/skills/cometchat-react-calls/references/call-session.md +0 -235
  470. package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
  471. package/skills/cometchat-react-calls/references/device-management.md +0 -210
  472. package/skills/cometchat-react-calls/references/group-calls.md +0 -257
  473. package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
  474. package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
  475. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
  476. package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
  477. package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
  478. package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
  479. package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
  480. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
  481. package/skills/cometchat-react-calls/references/share-invite.md +0 -175
  482. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
  483. package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
  484. package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
  485. package/skills/cometchat-react-patterns/SKILL.md +0 -628
  486. package/skills/cometchat-react-push/SKILL.md +0 -634
  487. package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
  488. package/skills/cometchat-react-testing/SKILL.md +0 -413
  489. package/skills/cometchat-theming/SKILL.md +0 -498
  490. package/skills/cometchat-troubleshooting/SKILL.md +0 -294
@@ -1,734 +1,298 @@
1
1
  ---
2
2
  name: cometchat-android-v6-core
3
- description: "CometChat Android UIKit v6 core setup Gradle dependencies, SDK initialization, login/logout, and message sending"
3
+ description: "Foundational rules for the CometChat Android UI Kit v6 the two UI cohorts and their artifacts, credentials via the gitignored assets settings file, initFromSettings → login → render ordering, the component map, and the production-ready core chat surface. Read this first for any Android CometChat task. Triggers: CometChat Android setup, Kotlin chat UI kit, Jetpack Compose chat."
4
4
  license: "MIT"
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."
5
+ compatibility: "Android minSdk >=28; compileSdk >=36; Kotlin >=2.1; AGP >=8.9.1; JVM target 11; com.cometchat:chatuikit-kotlin-android ^6 (XML Views) OR com.cometchat:chatuikit-compose-android ^6 (Jetpack Compose) 6.0.x, verified 6.0.5; com.cometchat:chat-sdk-android ^5 (5.0.x); optional com.cometchat:calls-sdk-android ^5"
6
6
  metadata:
7
7
  author: "CometChat"
8
- version: "3.0.1"
9
- tags: "cometchat, android, init, login, gradle, setup, core"
8
+ version: "1.1.0"
9
+ tags: "chat cometchat android kotlin compose views core rules initialization native"
10
10
  ---
11
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
-
14
- > **Companion skills:** cometchat (dispatcher), cometchat-android-v6-builder-settings (detailed UIKitSettings config), cometchat-android-v6-events (event system)
15
-
16
- ## Purpose
12
+ > **Ground truth:** `com.cometchat:chatuikit-{kotlin,compose}-android@6` + catalog `android-v6.json`
13
+ > (287 public symbols, generated from the INSTALLED 6.0.5 source) + `features.android-v6.json`.
14
+ > Official docs: <https://www.cometchat.com/docs/ui-kit/android/overview> · scoped index
15
+ > `…/ui-kit/android/llms-android-v6.md`. Verify every symbol against the catalog; fetch signatures
16
+ > from docs (`references/docs-map.md`); never trust memory.
17
+ >
18
+ > ⚠️ **ONE kit, TWO cohorts.** `chatuikit-kotlin-android` (XML Views) and `chatuikit-compose-android`
19
+ > (Jetpack Compose) are different artifacts with different namespaces. Component NAMES are shared, the
20
+ > wiring is not — Views uses `setOnX(...)` setters, Compose uses `onX =` params. **Never install both.**
21
+ > **v5 Java snippets do not compile against v6** (`com.cometchat.chatuikit.*` → `com.cometchat.uikit.*`);
22
+ > that migration is `cometchat-android-v6-migration`.
23
+ >
24
+ > ⚠️ **Some docs snippets are ahead of / behind the shipped kit.** Where a baked signature here differs
25
+ > from a docs page, the baked one was verified against the installed 6.0.5 source (gap logged
26
+ > internally). Compile before you trust a docs fence.
17
27
 
18
- Set up CometChat Android UIKit v6 in a project: add Gradle dependencies, initialize the SDK, authenticate users, and send messages. This skill covers the shared `chatuikit-core` module that both Kotlin Views and Jetpack Compose stacks depend on.
28
+ <!-- core is the companion the other android v6 skills read; it has no Companion block of its own. -->
19
29
 
20
30
  ## Use this skill when
31
+ "add chat to my Android app", "set up CometChat credentials", "integrate CometChat in Kotlin/Compose", "show a conversations + messages screen", "build a chat app". An unscoped "add chat" means the **production-ready core chat surface** below — not a bare list, and not the whole tab-based app (that grows via `cometchat-android-v6-{kotlin,compose}-placement`).
21
32
 
22
- - Adding CometChat to a new Android project
23
- - Setting up Gradle dependencies for CometChat UIKit v6
24
- - Initializing the CometChat SDK
25
- - Implementing login, logout, or user creation
26
- - Sending text, media, or custom messages via `CometChatUIKit`
27
-
28
- ## Do not use this skill when
29
-
30
- - Configuring `UIKitSettings` in detail (use `cometchat-android-v6-builder-settings`)
31
- - Working with UI components (use `cometchat-android-v6-kotlin-components` or `cometchat-android-v6-compose-components`)
32
- - Handling events (use `cometchat-android-v6-events`)
33
-
34
- ## 1. Gradle Setup
35
-
36
- ### 1.1 Add the CometChat Maven Repository
37
-
38
- In `settings.gradle` or `settings.gradle.kts`:
39
-
40
- ```kotlin
41
- dependencyResolutionManagement {
42
- repositories {
43
- google()
44
- mavenCentral()
45
- maven { url = uri("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/") }
46
- }
47
- }
48
- ```
49
-
50
- ### 1.2 Add Dependencies
51
-
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.
53
-
54
- ```kotlin
55
- // Jetpack Compose stack (includes core transitively)
56
- implementation("com.cometchat:chatuikit-compose-android:6.0.+")
57
-
58
- // Kotlin Views stack (includes core transitively)
59
- implementation("com.cometchat:chatuikit-kotlin-android:6.0.+")
60
-
61
- // Core only (no UI — for shared modules or custom UI)
62
- implementation("com.cometchat:chatuikit-core-android:6.0.+")
63
- ```
64
-
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`.
33
+ ## Prerequisites & install
34
+ **Pick ONE cohort** the app's existing UI stack decides:
70
35
 
71
36
  ```kotlin
72
- android {
73
- compileSdk = 36
74
- defaultConfig {
75
- minSdk = 28
76
- }
77
- compileOptions {
78
- sourceCompatibility = JavaVersion.VERSION_11
79
- targetCompatibility = JavaVersion.VERSION_11
80
- }
81
- kotlinOptions {
82
- jvmTarget = "11"
83
- }
84
- }
85
- ```
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
-
94
- ### 1.3a AndroidX + Jetifier (REQUIRED — non-negotiable)
95
-
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:
97
-
98
- ```
99
- Duplicate class android.support.v4.os.ResultReceiver$1 found in modules
100
- core-1.16.0.aar -> core-1.16.0-runtime (androidx.core:core:1.16.0)
101
- and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime
102
- (com.android.support:support-compat:26.1.0)
103
- ```
104
-
105
- **Add these three lines to `gradle.properties` at the project root** before any UI Kit code is wired in:
106
-
107
- ```properties
108
- org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m
109
- android.useAndroidX=true
110
- android.enableJetifier=true
111
- ```
112
-
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.
114
-
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.
116
-
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.
118
-
119
- ### 1.3b Annotation library exclude (REQUIRED — non-negotiable)
120
-
121
- The CometChat Chat SDK transitively depends on `org.jetbrains:annotations-java5:17.0.0`, which collides with Kotlin stdlib's `org.jetbrains:annotations:23.0.0` and fails the build with:
122
-
123
- ```
124
- Duplicate class org.jetbrains.annotations.ApiStatus$* found in modules
125
- annotations-23.0.0 (org.jetbrains:annotations:23.0.0)
126
- and annotations-java5-17.0.0 (org.jetbrains:annotations-java5:17.0.0)
127
- ```
37
+ // settings.gradle.kts → dependencyResolutionManagement.repositories
38
+ maven("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/")
128
39
 
129
- **Add this block to `app/build.gradle.kts`** at the top level (sibling of the `android { }` and `dependencies { }` blocks), before any UI Kit code is wired in:
130
-
131
- ```kotlin
40
+ // app/build.gradle.kts repo/exclude/compileOptions are COHORT-NEUTRAL (the duplicate-class
41
+ // collision comes via chatuikit-core-android, which BOTH cohorts pull); only the artifact differs
132
42
  configurations.all {
133
- // CometChat SDK transitively pulls org.jetbrains:annotations-java5:17.0.0,
134
- // which collides with Kotlin stdlib's org.jetbrains:annotations:23.0.0.
43
+ // REQUIRED without it the first build fails at dexing with ~40
44
+ // "Duplicate class org.jetbrains.annotations.*" errors (docs getting-started-{kotlin,jetpack}).
135
45
  exclude(group = "org.jetbrains", module = "annotations-java5")
136
46
  }
137
- ```
138
-
139
- This is mandatory for both V5 and V6, both Compose and Kotlin Views. Idempotent — if the block already exists, leave it.
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
-
156
- ### 1.4 Credentials → `local.properties` → `BuildConfig`
157
-
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.
159
47
 
160
- **Step 1.** Put credentials in `local.properties` (project root, gitignored by default in every Android Studio template):
48
+ // gradle.properties REQUIRED, both lines (why: dexing dup-class; references/troubleshooting.md):
49
+ // android.useAndroidX=true android.enableJetifier=true
161
50
 
162
- ```properties
163
- cometchat.appId=<APP_ID>
164
- cometchat.region=<REGION>
165
- cometchat.authKey=<AUTH_KEY>
166
- ```
167
-
168
- **Step 2.** In `app/build.gradle.kts`, read those properties and surface them as `BuildConfig` fields:
169
-
170
- ```kotlin
171
- import java.util.Properties
172
-
173
- val localProps = Properties().apply {
174
- val f = rootProject.file("local.properties")
175
- if (f.exists()) f.inputStream().use { load(it) }
51
+ dependencies {
52
+ implementation("com.cometchat:chatuikit-kotlin-android:6.0.5")
53
+ // implementation("com.cometchat:calls-sdk-android:5.0.4") // only for voice/video
176
54
  }
177
-
178
55
  android {
179
- defaultConfig {
180
- buildConfigField("String", "COMETCHAT_APP_ID", "\"${localProps.getProperty("cometchat.appId", "")}\"")
181
- buildConfigField("String", "COMETCHAT_REGION", "\"${localProps.getProperty("cometchat.region", "")}\"")
182
- buildConfigField("String", "COMETCHAT_AUTH_KEY", "\"${localProps.getProperty("cometchat.authKey", "")}\"")
183
- }
184
- buildFeatures { buildConfig = true }
56
+ buildFeatures { viewBinding = true }
57
+ compileOptions { sourceCompatibility = JavaVersion.VERSION_11; targetCompatibility = JavaVersion.VERSION_11 }
185
58
  }
186
- ```
187
-
188
- **Step 3.** In code, read `BuildConfig.COMETCHAT_APP_ID` etc.:
189
-
190
- ```kotlin
191
- val settings = UIKitSettings.UIKitSettingsBuilder()
192
- .setAppId(BuildConfig.COMETCHAT_APP_ID)
193
- .setRegion(BuildConfig.COMETCHAT_REGION)
194
- .setAuthKey(BuildConfig.COMETCHAT_AUTH_KEY) // dev only drop for production
195
- .build()
196
- ```
197
-
198
- If `npx @cometchat/skills-cli provision setup --framework android` ran first, it wrote a `.env` as a credentials handoff. Migrate those values into `local.properties` (above) and delete the `.env` Android won't read it at runtime.
199
-
200
- ## 2. SDK Initialization
201
-
202
- Initialize once in your `Application` class or splash screen never in every Activity.
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
-
59
+ // JVM 11 (Kotlin 2.2+ rejects kotlinOptions{}). Fully-qualified: a mid-file .kts import won't compile.
60
+ kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) } }
61
+ ```
62
+ **Theme kit views under a `CometChatTheme.DayNight`-derived theme — REQUIRED (Views), not cosmetic.**
63
+ Kit views resolve `?attr/cometchat*` at inflate time; outside such a theme the FIRST kit view crashes
64
+ (`IllegalArgumentException`/`InflateException` on `?attr/cometchatPrimaryColor` — verified on device).
65
+ **Greenfield** → re-parent app-wide: `<style name="AppTheme" parent="CometChatTheme.DayNight" />` +
66
+ `<application android:theme="@style/AppTheme">`. **Brownfield** (app HAS its own theme) → do NOT
67
+ re-parent (`CometChatTheme.DayNight` parents MaterialComponents, so Material3-only host attrs stop
68
+ resolving — you'd break their screens); scope a derived style to the chat Activities (manifest
69
+ `android:theme`) + `ContextThemeWrapper` for fragment/tab-embedded views — recipe: `kotlin-placement` Placement 2.
70
+
71
+ Compose cohort: swap the artifact for `com.cometchat:chatuikit-compose-android:6.0.5` and use `buildFeatures { compose = true }` + the Kotlin Compose plugin. **Build floors all forced by the transitive `androidx.core:core:1.18.0` and all failing with the SAME opaque `checkDebugAarMetadata` error, so bump them together:** **minSdk 28 · compileSdk 36 · AGP ≥ 8.9.1 · Gradle ≥ 8.11 · Kotlin ≥ 2.1** (exact error strings + fixes in `-troubleshooting`; verified on device). `chatuikit-core-android` and `chat-sdk-android` arrive transitively — never add the UI Kit twice, and never mix a v5 `chat-uikit-android` into the tree (**version_conflict STOP**).
72
+
73
+ ## Setup & credentials (essentials — full detail: `references/setup-credentials.md`)
74
+ 1. **Detect the project AND pick the cohort — never guess.** `npx @cometchat/skills detect --json`
75
+ (or READ the gradle files). The signals are
76
+ `android_variant` ∈ **`compose` · `views` · `mixed` · `unknown`** (both Groovy and Kotlin DSL):
77
+ **`compose`** use Compose, don't offer Views · **`views`** → use Views · **`mixed`/`unknown`**
78
+ → **ASK and WAIT** (recommend Compose for greenfield). **Announce the cohort and why before
79
+ writing code** — the cohorts are different artifacts that must not coexist, so it is the one
80
+ choice the user cannot cheaply undo. If `existing_cometchat` is true, resolve `version_conflict`
81
+ FIRST (v4/v5 kit present STOP + offer `cometchat-android-v6-migration`). Decision table +
82
+ signals: `references/setup-credentials.md` §1.
83
+ 2. **Credentials — OFFER to fetch from the dashboard FIRST**, never default to "paste it yourself": (a) load the CometChat CLI on demand (`npx @cometchat/skills-cli@3 auth login`, `provision list --json` → ask which app, `provision use --app-id <id> --json`); or (b) manual paste from Dashboard → Your App → Credentials. Ask & wait — never guess.
84
+ 3. **Write `app/src/main/assets/cometchat-settings.json`** (the file `initFromSettings` reads) and **gitignore it**:
210
85
  ```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
- }
86
+ { "appId": "APP_ID", "region": "REGION", "credentials": { "authKey": "AUTH_KEY" },
87
+ "uiKit": { "subscribePresenceForAllUsers": true, "enableCalling": false } }
236
88
  ```
237
89
 
238
- > **Commit `cometchat-settings.json` do not gitignore it** (the file is part of the integration). Its `authKey` is an **optional demo/POC credential**: a quick-start affordance so a PM or developer can see working chat *before* the backend auth-token flow is wired (that flow often waits on internal approvals). Because the file is committed to source control, treat the key as public — use a **dedicated demo CometChat app** (a committed key trips secret scanners and stays in git history; never reuse a production app's key). Switch to a server-minted `authToken` via `loginWithAuthToken()` before production, where `authKey` must not ship.
239
-
240
- **Step 2 init in `Application.onCreate()`.** No `UIKitSettingsBuilder` the SDK reads `app/src/main/assets/cometchat-settings.json` itself:
90
+ > ⚠️ **`enableCalling: true` and the calls artifact go together or not at all** the flag without
91
+ > `com.cometchat:calls-sdk-android` crashes the app at launch. Why and symptoms: docs
92
+ > getting-started-{kotlin,jetpack} + calling-integration. Leave the flag `false` in an app without calling.
241
93
 
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
- ```
94
+ `appId` + `region` required (else `ERR_SETTINGS_INVALID`); missing file → `ERR_SETTINGS_FILE_NOT_FOUND`. **Auth Key is dev-only** — omit it in release builds and log in with a server-minted token (`cometchat-android-v6-production`).
256
95
 
257
- ### `UIKitSettingsBuilder` init (fallbackany kit before `6.0.2`)
96
+ ## Integration ordering (BAKEDinvariant)
97
+ Docs warning, verbatim: *"`init()` must resolve before you call `login()`. Calling `login()` before init completes will fail silently."*
258
98
 
259
99
  ```kotlin
260
- import com.cometchat.uikit.core.CometChatUIKit
261
- import com.cometchat.uikit.core.UIKitSettings
262
100
  import com.cometchat.chat.core.CometChat
263
101
  import com.cometchat.chat.exceptions.CometChatException
264
-
265
- val settings = UIKitSettings.UIKitSettingsBuilder()
266
- .setAppId("YOUR_APP_ID")
267
- .setRegion("us") // "us" or "eu"
268
- .setAuthKey("YOUR_AUTH_KEY") // dev only — use token auth in production
269
- .build()
270
-
271
- CometChatUIKit.init(context, settings, object : CometChat.CallbackListener<String>() {
272
- override fun onSuccess(result: String) {
273
- // SDK ready — proceed to login
274
- }
275
- override fun onError(e: CometChatException) {
276
- // Handle initialization error
277
- }
278
- })
279
- ```
280
-
281
- For calling features, enable them in settings:
282
-
283
- ```kotlin
284
- val settings = UIKitSettings.UIKitSettingsBuilder()
285
- .setAppId("YOUR_APP_ID")
286
- .setRegion("us")
287
- .setAuthKey("YOUR_AUTH_KEY")
288
- .setEnableCalling(true) // Auto-initializes CometChatCalls SDK
289
- .build()
290
- ```
291
-
292
- See `cometchat-android-v6-builder-settings` for all `UIKitSettingsBuilder` options.
293
-
294
- ## 3. Authentication
295
-
296
- ### 3.1 Login with UID (Development Only)
297
-
298
- ```kotlin
299
- import com.cometchat.uikit.core.CometChatUIKit
300
- import com.cometchat.chat.core.CometChat // for CometChat.CallbackListener
301
102
  import com.cometchat.chat.models.User
302
- import com.cometchat.chat.exceptions.CometChatException
303
-
304
- CometChatUIKit.login("user_uid", object : CometChat.CallbackListener<User>() {
305
- override fun onSuccess(user: User) {
306
- // User logged in — show chat UI
307
- }
308
- override fun onError(e: CometChatException) {
309
- // Handle login error
310
- }
311
- })
312
- ```
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
-
316
- ### 3.2 Login with Auth Token (Production)
317
-
318
- ```kotlin
319
- CometChatUIKit.loginWithAuthToken("auth_token_from_server",
320
- object : CometChat.CallbackListener<User>() {
321
- override fun onSuccess(user: User) {
322
- // User logged in
323
- }
324
- override fun onError(e: CometChatException) {
325
- // Handle error
326
- }
327
- }
328
- )
329
- ```
330
-
331
- ### 3.3 Logout
332
-
333
- ```kotlin
334
- CometChatUIKit.logout(object : CometChat.CallbackListener<String>() {
335
- override fun onSuccess(message: String) {
336
- // User logged out — navigate to login screen
337
- }
338
- override fun onError(e: CometChatException) {
339
- // Handle error
340
- }
341
- })
342
- ```
343
-
344
- ### 3.4 Create User
345
-
346
- ```kotlin
347
- val user = User().apply {
348
- uid = "new_user_uid"
349
- name = "New User"
350
- }
103
+ import com.cometchat.uikit.core.CometChatUIKit
351
104
 
352
- CometChatUIKit.createUser(user, object : CometChat.CallbackListener<User>() {
353
- override fun onSuccess(createdUser: User) {
354
- // User creatednow login
355
- }
356
- override fun onError(e: CometChatException) {
357
- // Handle error
105
+ // initFromSettings reads assets/cometchat-settings.json, persists integrationSource="ai-agent"
106
+ // for telemetry attribution, and auto-inits the Calls SDK when uiKit.enableCalling is true.
107
+ // Do NOT default to the classic UIKitSettingsBuilder + init() it loses attribution.
108
+ CometChatUIKit.initFromSettings(this, object : CometChat.CallbackListener<String>() {
109
+ override fun onSuccess(result: String) { // init resolved — only now login
110
+ if (CometChatUIKit.getLoggedInUser() == null) {
111
+ CometChatUIKit.login(uid, object : CometChat.CallbackListener<User>() {
112
+ // ⚠️ inside this object, `this` is the LISTENER, not the Activity — navigating
113
+ // with `Intent(this, …)` does not compile. Qualify it: `this@YourActivity`.
114
+ override fun onSuccess(user: User) {
115
+ startActivity(Intent(this@MainActivity, ConversationActivity::class.java)); finish()
116
+ }
117
+ override fun onError(e: CometChatException) { /* render an error state */ }
118
+ })
119
+ } else { /* session already live — unlock */ }
358
120
  }
121
+ override fun onError(e: CometChatException?) { /* render an error state; do NOT open chat */ }
359
122
  })
360
123
  ```
124
+ Init once (Application or a splash gate), never per Activity. **Which UID?** `login()` needs a user that ALREADY exists — never invent one; take it from Dashboard → Users (fresh apps seed `cometchat-uid-1…`). Prod → `loginWithAuthToken`. Detail: `references/lifecycle.md`.
125
+
126
+ ## Sizing — fill the parent, handle insets and the keyboard
127
+ The kit fills the box you give it — a collapsed surface is a HOST sizing defect, never a kit bug. Four invariants (full recipe: `references/layout.md`):
128
+ - **Fill**: `match_parent` / `0dp`+`layout_weight` (Views) — never `wrap_content` for a list or the chat surface.
129
+ - **Insets**: `enableEdgeToEdge()` **plus** consuming the insets. `enableEdgeToEdge()` ALONE draws
130
+ the kit under the status bar — the toolbar title then collides with the clock (verified on device).
131
+ Give the layout root an id and pad it:
132
+ ```kotlin
133
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.root)) { v, insets ->
134
+ val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
135
+ val ime = insets.getInsets(WindowInsetsCompat.Type.ime()) // message screen only
136
+ v.setPadding(bars.left, bars.top, bars.right, maxOf(bars.bottom, ime.bottom))
137
+ insets
138
+ }
139
+ ```
140
+ - **Keyboard**: `windowSoftInputMode="adjustResize"` (Views) so the composer stays visible while typing.
141
+ - **Embedded in a host you do NOT own** (a tab, a fragment, someone else's container): set the
142
+ listener on YOUR subtree root, not the Activity root, and skip `enableEdgeToEdge()` — the host
143
+ owns the window. Still consume insets: skipping them because "the host owns it" puts the toolbar
144
+ back under the clock.
145
+ - **No load-transition reflow**: the surface is full-size from frame 1; the kit renders its own loading/empty state inside it.
361
146
 
362
- ## 4. Utility Methods
363
-
364
- ```kotlin
365
- // Check if SDK is initialized
366
- val isReady = CometChatUIKit.isSDKInitialized()
367
-
368
- // Check if Calls SDK is initialized (only if enableCalling = true)
369
- val callsReady = CometChatUIKit.isCallsSDKInitialized()
370
-
371
- // Get currently logged-in user (null if not logged in)
372
- val currentUser: User? = CometChatUIKit.getLoggedInUser()
147
+ ## Component / API map (BAKED closed list — from `catalogs/android-v6.json`)
148
+ The closed list of shipped components lives in `references/component-props.md`
149
+ (and `catalogs/android-v6.json` is the oracle). Emit ONLY symbols that appear there.
373
150
 
374
- // Get current auth settings
375
- val authSettings: UIKitSettings? = CometChatUIKit.getAuthSettings()
151
+ ## Import paths
152
+ `…kotlin.presentation.<area>.ui.<Component>` **except the 3 calling components (no `.ui`)** and
153
+ formatters (`…kotlin.shared.formatters.*`). Full table: `references/component-props.md`.
376
154
 
377
- // Get conversation update settings
378
- val convSettings = CometChatUIKit.getConversationUpdateSettings()
379
- ```
155
+ ## Callback names Views uses `setOnX(...)`, Compose uses `onX =`
156
+ Same component, same intent, different wiring. Full signature table (verified vs 6.0.5):
157
+ `references/component-props.md` § Callback shapes.
380
158
 
381
- ## 5. Sending Messages
159
+ > ⚠️ **Docs drift — trust `references/component-props.md`, not the docs pages** for callback
160
+ > shapes (the 3-arg thread callback and `setParentMessage` on the list are both wrong upstream).
382
161
 
383
- `CometChatUIKit` provides convenience methods that automatically emit events via `CometChatEvents`:
384
-
385
- ### 5.1 Text Message
162
+ ## Golden path the production-ready core surface (Kotlin XML Views)
163
+ The default for an unscoped "add chat". **One screen per Activity with a real back stack** — never a web-style two-pane split. Host Activities must be lifecycle-aware (`AppCompatActivity`/`ComponentActivity`/`FragmentActivity`) and manifest-registered.
386
164
 
387
165
  ```kotlin
388
- val textMessage = TextMessage("receiver_uid", "Hello!", CometChatConstants.RECEIVER_TYPE_USER)
389
-
390
- CometChatUIKit.sendTextMessage(textMessage, object : CometChat.CallbackListener<TextMessage>() {
391
- override fun onSuccess(message: TextMessage) {
392
- // Message sent
393
- }
394
- override fun onError(e: CometChatException) {
395
- // Handle error
166
+ // ConversationActivity.kt the list, wired to open the message screen
167
+ class ConversationActivity : AppCompatActivity() {
168
+ override fun onCreate(savedInstanceState: Bundle?) {
169
+ super.onCreate(savedInstanceState)
170
+ enableEdgeToEdge()
171
+ setContentView(R.layout.activity_conversation) // hosts CometChatConversations at match_parent
172
+
173
+ val conversations = findViewById<CometChatConversations>(R.id.conversations)
174
+ conversations.setTitle("Chats")
175
+ conversations.setOnItemClick { conversation ->
176
+ val intent = Intent(this, MessageActivity::class.java)
177
+ when (val entity = conversation.conversationWith) {
178
+ is User -> intent.putExtra("user", entity)
179
+ is Group -> intent.putExtra("group", entity)
180
+ }
181
+ startActivity(intent)
182
+ }
183
+ conversations.setOnSearchClick { startActivity(Intent(this, SearchActivity::class.java)) }
396
184
  }
397
- })
398
- ```
399
-
400
- ### 5.2 Media Message
401
-
402
- ```kotlin
403
- val mediaMessage = MediaMessage(
404
- "receiver_uid",
405
- file, // java.io.File
406
- CometChatConstants.MESSAGE_TYPE_IMAGE,
407
- CometChatConstants.RECEIVER_TYPE_USER
408
- )
409
-
410
- CometChatUIKit.sendMediaMessage(mediaMessage, object : CometChat.CallbackListener<MediaMessage>() {
411
- override fun onSuccess(message: MediaMessage) { }
412
- override fun onError(e: CometChatException) { }
413
- })
414
- ```
415
-
416
- ### 5.3 Custom Message
417
-
418
- ```kotlin
419
- val customMessage = CustomMessage(
420
- "receiver_uid",
421
- CometChatConstants.RECEIVER_TYPE_USER,
422
- "custom_type",
423
- JSONObject().put("key", "value")
424
- )
425
-
426
- CometChatUIKit.sendCustomMessage(customMessage, object : CometChat.CallbackListener<CustomMessage>() {
427
- override fun onSuccess(message: CustomMessage) { }
428
- override fun onError(e: CometChatException) { }
429
- })
430
- ```
431
-
432
- All send methods automatically:
433
- 1. Set `sender`, `muid`, and `sentAt` if not already set
434
- 2. Emit `CometChatMessageEvent.MessageSent` with `IN_PROGRESS` status
435
- 3. On success: emit with `SUCCESS` status
436
- 4. On error: embed error in metadata and emit with `ERROR` status
437
-
438
- ## Hard rules
439
-
440
- - NEVER call `CometChatUIKit.init()` in every Activity — call it once in `Application.onCreate()` or a splash screen
441
- - NEVER ship `authKey` in production builds — use `loginWithAuthToken()` with server-generated tokens
442
- - ALWAYS check `isSDKInitialized()` before making SDK calls if initialization might not have completed
443
- - `minSdk` must be 28 or higher — v6 does not support lower API levels
444
- - `compileSdk` should be 36 for full compatibility
445
- - Both UI stacks depend on `chatuikit-core` transitively — do NOT add core as a separate dependency when using a UI stack
446
- - `gradle.properties` MUST contain `android.useAndroidX=true` AND `android.enableJetifier=true` — see § 1.3a. Without Jetifier, the build fails with "Duplicate class android.support.v4.os.ResultReceiver$1" because the CometChat SDK's transitive `com.android.support:support-compat` collides with `androidx.core` in any modern Android Studio project
447
-
448
- ## Visual Builder integration
449
-
450
- > **⚠ The Visual Builder emits V5-shaped code.** The canonical builder repo at the Android Visual Builder ZIP (download from https://preview.cometchat.com/downloads/cometchat-builder-android.zip) uses `com.cometchat:chat-uikit-android:5.2.6` — the **V5** Android UI Kit. There is no V6-native Visual Builder canonical from vendor side yet ([F22 finding, 2026-05-22](https://github.com/cometchat/cometchat-skills/issues)). When a V6 project picks the Visually path, skills emits V5 deps (`chat-uikit-android:5.+`) into `app/build.gradle` — your V6 Compose / Kotlin Views code in the rest of the project is untouched, but the Visual-Builder-emitted screens are V5-flavored. Treat as transitional until vendor publishes a V6 canonical. V6 customers preferring a single-version dep tree should use the In-code path.
451
- >
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.
453
-
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/`):
457
-
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/`)
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)
461
-
462
- ### 1. Run `cometchat builder export`
463
-
464
- ```bash
465
- cometchat builder export --platform android --json
466
- ```
467
-
468
- Defaults to `--output cometchat/`. The CLI emits the helper with the original `com.cometchat.builder` package declaration. **You must then move the files** to the customer's project + rewrite the package, per the table below:
469
-
470
- ### 2. Place + patch (after `builder export`)
471
-
472
- | Source (from `--output`) | Destination | Notes |
473
- |---|---|---|
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. |
475
- | `cometchat/BuilderSettingsHelper.kt` | `app/src/main/java/<customer-package>/cometchat/BuilderSettingsHelper.kt` | **Move + 3 transforms** — see F50/F51 below. |
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. |
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. |
478
-
479
- #### F50 + F51 — BuilderSettingsHelper.kt requires 3 transforms on move (NON-NEGOTIABLE)
480
-
481
- After moving `cometchat/BuilderSettingsHelper.kt` to
482
- `app/src/main/java/<customer-package>/cometchat/BuilderSettingsHelper.kt`,
483
- the file needs these 3 transforms before it compiles:
484
-
485
- **1. Rewrite the package line:**
486
-
487
- ```kotlin
488
- package com.cometchat.builder // before
489
- package com.example.myapp.cometchat // after (match customer's applicationId + .cometchat suffix)
490
- ```
491
-
492
- **2. Add 3 explicit imports** under the existing import block:
493
-
494
- ```kotlin
495
- import com.cometchat.builder.CometChatBuilderSettings // auto-generated constants class — stays at original package
496
- import com.example.myapp.BuildConfig // customer's BuildConfig — must use their applicationId
497
- import com.example.myapp.R // customer's R class — same applicationId
498
- ```
499
-
500
- Without these, the file fails to compile with `Unresolved reference 'R'`, `Unresolved reference 'BuildConfig'`, `Unresolved reference 'CometChatBuilderSettings'`. (When the file was in the original `com.cometchat.builder` package, these resolved implicitly via same-package; after the rewrite, they need explicit imports.)
501
-
502
- **3. Strip the entire `applySettingsToBottomNavigationView` method** (per README option 2 — skills doesn't emit the bottom-nav shape). The method references `R.id.nav_chats`, `R.id.nav_calls`, `R.id.nav_users`, `R.id.nav_groups` which don't exist in the customer's `res/menu/`. Removing the method removes the references.
503
-
504
- ```kotlin
505
- // Delete the entire function from `fun applySettingsToBottomNavigationView(...)` to its closing `}` —
506
- // roughly lines 27-54 in the canonical file. Leave a comment in its place so future readers
507
- // understand why:
508
- //
509
- // // applySettingsToBottomNavigationView removed per cometchat-android-v6-core
510
- // // SKILL.md (README option 2 — no bottom-nav module in app integration).
511
- ```
512
-
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.
514
-
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.
516
-
517
- Resync = re-run `cometchat builder export --platform android --force`. Re-apply the move+package-rewrite each time (Skills should automate this in a future release).
518
-
519
- ### Files patched
520
-
521
- | Path | Patch |
522
- |---|---|
523
- | `settings.gradle.kts` | Add `maven("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/")` to BOTH `pluginManagement.repositories` AND `dependencyResolutionManagement.repositories` |
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 |
525
- | `gradle.properties` | `android.useAndroidX=true` + `android.enableJetifier=true` per §1.3a (non-negotiable) |
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. |
527
- | `Application` subclass | Call `CometChatUIKit.init(this, uiKitSettings)` in `onCreate()` per §2 — credentials from `BuildConfig.COMETCHAT_*` via §1.4 |
528
-
529
- ### Init flow (build-time + runtime)
530
-
531
- **Build time** — the Gradle plugin:
532
- 1. Reads `app/cometchat-builder-settings.json`
533
- 2. Generates `com.cometchat.builder.CometChatBuilderSettings` (typed Kotlin constants: `ChatFeatures.CoreMessagingExperience.PHOTOSSHARING`, `Style.Color.BRANDCOLOR`, etc.)
534
- 3. Injects style values into `@style/CometChat.Builder.Theme` so the kit's `CometChatTheme` resolves builder tokens automatically
535
-
536
- **Runtime** — customer code accesses both:
537
- ```kotlin
538
- import com.cometchat.builder.CometChatBuilderSettings // generated by plugin
539
- import <package>.cometchat.BuilderSettingsHelper // copied helper
540
-
541
- if (CometChatBuilderSettings.ChatFeatures.CoreMessagingExperience.PHOTOSSHARING) {
542
- // photo attachment enabled
543
185
  }
544
- BuilderSettingsHelper.applySettingsToMessageList(binding.messageList)
545
186
  ```
546
-
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
187
  ```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
-
188
+ // MessageActivity.kt — header + list + composer, all bound to the SAME target
189
+ class MessageActivity : AppCompatActivity() {
579
190
  override fun onCreate(savedInstanceState: Bundle?) {
580
191
  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
192
+ enableEdgeToEdge()
193
+ setContentView(R.layout.activity_message) // vertical LinearLayout, list = 0dp + weight 1
194
+
195
+ val header = findViewById<CometChatMessageHeader>(R.id.message_header)
196
+ val list = findViewById<CometChatMessageList>(R.id.message_list)
197
+ val composer = findViewById<CometChatMessageComposer>(R.id.message_composer)
198
+
199
+ val user = intent.getParcelableExtra<User>("user")
200
+ val group = intent.getParcelableExtra<Group>("group")
201
+ user?.let { header.setUser(it); list.setUser(it); composer.setUser(it) }
202
+ group?.let { header.setGroup(it); list.setGroup(it); composer.setGroup(it) }
203
+
204
+ header.setBackButtonVisibility(View.VISIBLE) // the callback is inert without this
205
+ header.setOnBackPress { finish() }
206
+ list.setOnThreadRepliesClick { parent -> // ONE arg (verified vs 6.0.5)
207
+ startActivity(Intent(this, ThreadActivity::class.java).apply {
208
+ putExtra("raw_json", parent.rawMessage.toString())
209
+ user?.let { putExtra("user", it) }; group?.let { putExtra("group", it) }
210
+ })
595
211
  }
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
212
  }
604
213
  }
605
214
  ```
606
215
 
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
216
+ ### The core surface is FOUR things, not two
217
+ `contracts.android-v6.json` → `core-chat-surface` mandates all four by default; a list ↔ message screen is **half the surface**:
614
218
 
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.
219
+ | Capability | Component | Wire |
220
+ |---|---|---|
221
+ | conversations | `CometChatConversations` | `setOnItemClick` |
222
+ | messages | `CometChatMessageHeader` + `List` + `Composer` | `setUser`/`setGroup` + `setOnBackPress` |
223
+ | **threaded replies** | `CometChatThreadHeader` | `setOnThreadRepliesClick` → push a thread Activity |
224
+ | **search** | `CometChatSearch` | `setOnSearchClick` → push a search Activity (global), and the in-chat case scoped with `setUid`/`setGuid` |
618
225
 
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`:
226
+ On Android both are **pushed screens**, not side panels. The callbacks above are only *entry points* the pushed screens are where the mandated components render. Emit both, or the surface has tap targets that lead nowhere:
620
227
 
621
228
  ```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:
644
-
229
+ // ThreadActivity.kt — what setOnThreadRepliesClick pushes to.
230
+ // header takes the parent MESSAGE; list + composer take the parent message ID (Long).
231
+ val parent = BaseMessage.processMessage(JSONObject(intent.getStringExtra("raw_json")!!))
232
+ threadHeader.setParentMessage(parent)
233
+ threadList.setParentMessageId(parent.id)
234
+ threadComposer.setParentMessageId(parent.id)
235
+ // the thread list/composer ALSO need the conversation target, or replies silently never send:
236
+ user?.let { threadList.setUser(it); threadComposer.setUser(it) }
237
+ group?.let { threadList.setGroup(it); threadComposer.setGroup(it) }
238
+ // CometChatThreadHeader is DISPLAY-ONLY (no callbacks) → renders no back control; the HOST owns it
239
+ // here. Give the screen a toolbar back action (or say plainly it relies on system back) — a thread
240
+ // with no way out is a dead end.
241
+ ```
242
+ `SearchScope` is REQUIRED for `setSearchIn` and lives in **`com.cometchat.uikit.core.constants`** —
243
+ import it explicitly; it is not re-exported from the component's package.
645
244
  ```kotlin
646
- // app/src/main/java/<package>/cometchat/CometChatApp.kt — COMPOSE-ONLY alternative
647
- package <package>.cometchat
648
-
649
- import androidx.compose.foundation.layout.Column
650
- import androidx.compose.foundation.layout.fillMaxSize
651
- import androidx.compose.runtime.Composable
652
- import androidx.compose.runtime.getValue
653
- import androidx.compose.runtime.mutableStateOf
654
- import androidx.compose.runtime.remember
655
- import androidx.compose.runtime.setValue
656
- import androidx.compose.ui.Modifier
657
- import androidx.compose.ui.viewinterop.AndroidView
658
- import com.cometchat.chat.models.Group
659
- import com.cometchat.chat.models.User
660
- import com.cometchat.chatuikit.conversations.CometChatConversations
661
- import com.cometchat.chatuikit.messagecomposer.CometChatMessageComposer
662
- import com.cometchat.chatuikit.messageheader.CometChatMessageHeader
663
- import com.cometchat.chatuikit.messagelist.CometChatMessageList
664
-
665
- /**
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.
669
- *
670
- * CometChatUIKit.init(...) must have been called in Application.onCreate()
671
- * BEFORE this composable mounts — see §2.
672
- */
673
- @Composable
674
- fun CometChatApp() {
675
- var selectedUser by remember { mutableStateOf<User?>(null) }
676
- var selectedGroup by remember { mutableStateOf<Group?>(null) }
677
- val hasSelection = selectedUser != null || selectedGroup != null
678
-
679
- if (!hasSelection) {
680
- AndroidView(
681
- modifier = Modifier.fillMaxSize(),
682
- factory = { ctx ->
683
- CometChatConversations(ctx).apply {
684
- BuilderSettingsHelper.applySettingsToConversations(this)
685
- setOnItemClickListener { _, conversation ->
686
- when (val entity = conversation.conversationWith) {
687
- is User -> { selectedUser = entity; selectedGroup = null }
688
- is Group -> { selectedUser = null; selectedGroup = entity }
689
- }
690
- }
691
- }
692
- },
693
- )
694
- return
695
- }
696
-
697
- Column(Modifier.fillMaxSize()) {
698
- AndroidView(factory = { ctx ->
699
- CometChatMessageHeader(ctx).apply {
700
- user = selectedUser
701
- group = selectedGroup
702
- BuilderSettingsHelper.applySettingsToMessageHeader(this)
703
- }
704
- })
705
- AndroidView(modifier = Modifier.weight(1f), factory = { ctx ->
706
- CometChatMessageList(ctx).apply {
707
- user = selectedUser
708
- group = selectedGroup
709
- BuilderSettingsHelper.applySettingsToMessageList(this)
710
- }
711
- })
712
- AndroidView(factory = { ctx ->
713
- CometChatMessageComposer(ctx).apply {
714
- user = selectedUser
715
- group = selectedGroup
716
- BuilderSettingsHelper.applySettingsToMessageComposer(this)
717
- }
718
- })
719
- }
245
+ // SearchActivity.kt — global search; for IN-CHAT search scope it to the open conversation.
246
+ val search = findViewById<CometChatSearch>(R.id.search)
247
+ search.setSearchIn(listOf(SearchScope.CONVERSATIONS, SearchScope.MESSAGES))
248
+ user?.let { search.setUid(it.uid) } // in-chat scoping (omit for global)
249
+ group?.let { search.setGuid(it.guid) }
250
+ // CometChatSearch renders its OWN back arrow — without this it is inert (wire-or-hide).
251
+ search.setOnBackPressListener { finish() }
252
+ // Results must GO somewhere, carrying the SAME "user"/"group" extras the message screen reads.
253
+ // Passing the Conversation/BaseMessage itself navigates but never calls setUser/setGroup, so the
254
+ // screen loads forever ("no User/Group was set" — references/troubleshooting.md).
255
+ search.setOnConversationClick { openChat(it.conversationWith) } // already the OTHER party
256
+ search.setOnMessageClick { m ->
257
+ // group → the group; 1:1 → whoever is NOT me
258
+ openChat(if (m.receiverType == CometChatConstants.RECEIVER_TYPE_GROUP) m.receiver
259
+ else if (m.sender.uid == CometChatUIKit.getLoggedInUser()?.uid) m.receiver else m.sender)
260
+ }
261
+ // same when(entity) the conversations tap uses above — never push a screen with no target
262
+ private fun openChat(e: AppEntity?) = when (e) {
263
+ is User -> startActivity(Intent(this, MessageActivity::class.java).putExtra("user", e))
264
+ is Group -> startActivity(Intent(this, MessageActivity::class.java).putExtra("group", e))
265
+ else -> Unit
720
266
  }
721
267
  ```
268
+ Reuse existing navigation/theme/auth; add files + wiring only. Leave header call buttons and composer attach/emoji/voice as built-in defaults. Do NOT add tabs / detail screens / call logs / incoming call (`placement` growths) or gated extensions/AI unless asked — **the thread and search screens ARE the default.**
722
269
 
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.
724
-
725
- ### Calls + builder
726
-
727
- If any `CometChatBuilderSettings.CallFeatures.*` flag is true:
728
- 1. Init Calls SDK in `Application.onCreate()` alongside UI Kit (see `cometchat-android-v6-calls`)
729
- 2. Mount `CometChatIncomingCall` overlay the builder repo's `BuilderApplication.kt` registers `ActivityLifecycleCallbacks` and shows a `Snackbar`-hosted incoming-call view at the top of the foreground activity. Copy that pattern verbatim from `chat-builder/src/main/java/com/cometchat/builder/utils/BuilderApplication.kt` (inside the Android Visual Builder ZIP at https://preview.cometchat.com/downloads/cometchat-builder-android.zip)
730
- 3. FCM data-message wiring defer to `cometchat-android-v6-push`
731
-
732
- ### What is NOT honored in v1
733
-
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").
270
+ > **Jetpack Compose cohort:** the same four capabilities as composable params (`onItemClick =`, `onBackPress =`, `onThreadRepliesClick =`) inside a `NavHost` + `Scaffold` + `imePadding()`. Compose recipes SHIPuse `cometchat-android-v6-compose-{components,placement,customization}`; fall back to `references/docs-map.md` for long-tail params.
271
+ >
272
+ > ⚠️ **Compose "Auto — follow OS" (the default theming) is a CORE obligation, NOT automatic.** Unlike
273
+ > Views (`CometChatTheme.DayNight`) and iOS, the Compose kit ignores the device dark setting unless you
274
+ > wrap the gate + NavHost + every kit screen in `CometChatTheme(colorScheme = if (isSystemInDarkTheme())
275
+ > darkColorScheme() else lightColorScheme()){ }` (from `com.cometchat.uikit.compose.theme.*`) — no
276
+ > wrapper light defaults (verified; RULES.md §Ordering-invariants). This bare follow-OS wrapper is
277
+ > core; brand tokens are `cometchat-android-v6-compose-customization` §Theming.
278
+
279
+ ## Deep references (load only when the task needs them)
280
+ - `references/setup-credentials.md` — detect, cohort, version_conflict, the CLI credential fetch, the settings file, UID rules.
281
+ - `references/lifecycle.md` where to init, the login guard, auth-token prod path, logout, config changes.
282
+ - `references/layout.md` — the ONE mobile sizing standard (fill · insets · IME · no reflow · scroll containment).
283
+ - `references/component-props.md` — baked per-cohort signatures for the four drop-ins + the request-builder hooks.
284
+ - `references/docs-map.md` — intent → the exact docs `.md` twin (component table + SDK section + task guides).
285
+ - `references/anti-patterns.md` — the real-bug list (hardcoded creds, login-before-init, leaked listeners, wrap_content collapse, dead affordances, mixed cohorts).
286
+ - `references/troubleshooting.md` — symptom → cause → fix, the first stop when an integration renders wrong.
287
+
288
+ ## Common pitfalls
289
+ version_conflict (a v5 `chat-uikit-android` in the tree) · both cohorts installed · minSdk below 28 · credentials hardcoded instead of the gitignored settings file · classic `init()` instead of `initFromSettings` · login (or UI) before init's `onSuccess` · `wrap_content` on the chat surface · composer hidden by the IME · thread screen missing the `user`/`group` target (replies never send) · trusting the 3-arg thread callback from the docs.
290
+
291
+ ## Verify it works
292
+ Build + run → logcat shows init `onSuccess` then login `onSuccess` → conversations renders full-size; tap a conversation → the message screen loads for that user/group and messages send/receive; **"reply in thread" opens the thread screen and back returns**; the search entry point opens a real search screen and returns; the composer stays visible with the keyboard open; system bars don't overlap header/composer. Blank/stuck ⇒ something rendered before init resolved, wrong Region, or the Cloudsmith repo is missing. Compile gate: `./gradlew :app:assembleDebug # in YOUR app`.
293
+
294
+ ## Explain what you built (REQUIRED close)
295
+ Tell the user briefly: **(1) what I wired** (3–5 bullets, NAME the files); **(2) decisions & why**, flagging dev-only AS dev-only (Auth Key → server token for prod; the `<uid>`; the cohort); **(3) what I did NOT touch** (additive — navigation/auth/styles intact). Then **offer these THREE options and WAIT — do NOT auto-continue:**
296
+ - **① Add another feature** → check what's already wired, ASK which Dashboard extensions are enabled, suggest 3–4 gaps (calls · push · AI · notification feed · polls/stickers/translation). **Never suggest reactions or mentions — ON by default in v6.** → `cometchat-android-v6-features` / `-calls` / `-push`.
297
+ - **② Customize theming** → ask for brand color / light-dark / Material3 design system → `cometchat-android-v6-{kotlin,compose}-customization`.
298
+ - **③ Test it manually** → hand it back so they run it on a device.