@cometchat/skills 4.3.0 → 4.4.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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +2 -1
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +255 -19
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +313 -34
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +139 -78
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +34 -17
  184. package/skills/cometchat-native-calls/SKILL.md +28 -16
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +101 -32
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +57 -26
  202. package/skills/cometchat-native-features/SKILL.md +23 -16
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +9 -3
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +20 -6
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +44 -4
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +10 -4
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -0,0 +1,48 @@
1
+ # Clarification contract (all coding agents)
2
+
3
+ Every place a CometChat skill says **"ask the user"**, **"render an `AskUserQuestion`"**, **"MUST ask"**, or **"NON-NEGOTIABLE prompt"** means: **follow this contract.** It is **model-agnostic** — it works on Claude Code, Codex, Cursor, Gemini CLI, OpenAI coding agents, Windsurf, and any future agent. `AskUserQuestion` is merely Claude Code's name for step 1; every agent has an equivalent, and if it doesn't, the text fallback below is mandatory.
4
+
5
+ ## The contract
6
+
7
+ 1. **RENDER a structured choice.**
8
+ - If your runtime has a native structured-question primitive (Claude Code: `AskUserQuestion`; others may differ), use it.
9
+ - **If it does not, render a numbered text list** — a one-line header, the question, then each option on its own numbered line — and ask the user to reply with a number or the option text. Never skip the prompt just because you lack a GUI primitive.
10
+
11
+ 2. **WAIT for a real answer. Do NOT proceed on a guess.**
12
+ - Do not pick a default, do not infer the answer from the repo, the project name, or "what's most common."
13
+ - **Auto / YOLO / "moving fast for the demo" / approval-mode does NOT authorize skipping a user-facing decision.** Those modes govern *tool and shell approvals*, not product choices. Surface the prompt regardless of approval mode.
14
+
15
+ 3. **MAP the answer by VALUE / LABEL — never by ordinal position.**
16
+ - The user may reply with the option text, a number, or free text. Resolve it to the option's *meaning*, not "they typed 1 so it's the first option."
17
+ - This matters because different agents render options in different orders; matching on position silently corrupts the choice.
18
+
19
+ 4. **ACCEPT a free-text fallback.**
20
+ - If the answer isn't one of the listed options (a different `uid`, region, app name, framework version…), treat it as a valid custom value — do not loop re-prompting the same list.
21
+
22
+ 5. **ONE decision per prompt** unless the choices are genuinely independent. Don't bundle unrelated decisions (e.g. framework + uid + region) into a single question.
23
+
24
+ 6. **SELF-VERIFY before moving on.** Confirm you have an explicit answer for every *required* prompt of the current step. If you are running **headless / non-interactive** (no stdin, CI, cron), do **not** guess — STOP and emit the exact question + options so a human can answer, then resume.
25
+
26
+ ## Canonical text rendering (for agents without a structured primitive)
27
+
28
+ ```
29
+ ❓ <one-line question> (reply with the number or the text)
30
+ 1) <Option label> — <short description>
31
+ 2) <Option label> — <short description>
32
+ 3) <Option label> — <short description>
33
+ Or type your own answer.
34
+ ```
35
+
36
+ Wait for the reply. Resolve it to an option by label/text (or accept a custom value). Then continue.
37
+
38
+ ## Prompts in the CometChat skills that MUST follow this contract
39
+
40
+ These are load-bearing — skipping them silently picks defaults the user never saw, which corrupts downstream routing or ships broken code:
41
+
42
+ - **Greenfield framework choice** (when `detect` returns no framework) — never scaffold a framework the user didn't choose.
43
+ - **Android version** (V5 vs V6) and **Flutter version** (V5 vs V6) when the project is greenfield — these route to *different* SDKs; guessing wrong emits unusable code.
44
+ - **Android/Flutter surface** (Compose vs Kotlin Views; which screen) when both are present.
45
+ - **Dev-mode login UID** — never hardcode `cometchat-uid-1`; ask which test user. A default UID flagged as a Bot in the dashboard fails auth with an opaque error.
46
+ - **Sign-up flow choices** — product, role, intent, app name, region, industry. These mirror the dashboard browser flow and drive downstream recommendations.
47
+ - **Calling mode** (default UI calling vs session-mode vs raw SDK), **chat-only vs chat+calls**, and **custom-UI vs UI-Kit** when the journey forks.
48
+ - **Existing-integration decisions** — when a competing chat SDK, existing Firebase/push, or an existing auth system is detected (see the dispatcher's pre-flight scan), ask how to proceed rather than clobbering.
@@ -3,13 +3,14 @@ name: cometchat-a11y
3
3
  description: Accessibility (a11y) for CometChat UI Kit integrations across all families — React, React Native, Angular, Android (V5/V6), iOS, Flutter. Covers WCAG 2.1 AA targets, keyboard navigation in chat, screen reader announcements (live regions for new messages), color contrast, focus management on call screens, motion-reduction support, and the cross-family checks that catch the common production a11y bugs. Cross-family — applies wherever the agent is checking accessibility.
4
4
  license: "MIT"
5
5
  compatibility: "All CometChat UI Kit families v4.x / v5.x / v6.x"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "4.0.0"
10
9
  tags: "cometchat a11y accessibility wcag aa keyboard screen-reader voiceover talkback aria live-region focus-management contrast prefers-reduced-motion cross-family"
11
10
  ---
12
11
 
12
+ > **Ground truth:** per-platform UI Kit + `docs/fundamentals`. **Official docs:** https://www.cometchat.com/docs/fundamentals/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
13
+
13
14
  ## Purpose
14
15
 
15
16
  Accessibility for CometChat integrations. Out-of-the-box, the UI Kit components are mostly accessible — the kit's own buttons, inputs, and lists ship with semantic markup. Production gaps appear in the wiring **around** the kit: custom call surfaces, navigation, focus management on screen transitions, and contrast in custom themes.
@@ -101,7 +102,7 @@ export function ChatScreen() {
101
102
  }
102
103
  ```
103
104
 
104
- The kit's `CometChatMessageComposer` accepts a forwarded ref in v6; if not, query for the input via `composerRef.current?.querySelector("input, [contenteditable]")?.focus()`.
105
+ The kit's `CometChatMessageComposer` is a plain function component (no `forwardRef` in v6), so passing it a `ref` is a no-op. Wrap it in a focusable container and reach the input through the DOM: `composerRef.current?.querySelector("input, [contenteditable]")?.focus()`.
105
106
 
106
107
  ### React Native
107
108
 
@@ -3,13 +3,14 @@ name: cometchat-android-v5
3
3
  description: "Entry-point dispatcher for CometChat Android UI Kit v5. Detects project setup, understands what the dev is building, and routes to the right sub-skills."
4
4
  license: "MIT"
5
5
  compatibility: "Android 7.0+; Java 8+; Kotlin 1.8+; com.cometchat:chat-uikit-android:5.x"
6
- allowed-tools: "shell, file-read, file-search, file-list"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.0.0"
10
9
  tags: "chat cometchat android dispatcher entry-point integration"
11
10
  ---
12
11
 
12
+ > **Ground truth:** `com.cometchat:chat-uikit-android:5.x` (legacy/maintenance-only; +`calls-sdk-android:5.x`) — resolved AAR (javap) + `ui-kit/android`. **Official docs:** https://www.cometchat.com/docs/ui-kit/android/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
13
+
13
14
  ## Purpose
14
15
 
15
16
  This is the entry-point skill for CometChat Android UI Kit v5. It helps you understand what the developer is building, detects their project setup, and routes to the correct sub-skill for the task at hand.
@@ -3,7 +3,6 @@ name: cometchat-android-v5-calls
3
3
  description: CometChat Calls SDK v5 integration for native Android (V5 stable, Java + Kotlin Views). Covers SDK setup (Cloudsmith Maven, CallAppSettings, init), the dual-SDK ringing pattern (Chat SDK initiateCall + Calls SDK joinSession), session settings, event listeners, call logs, recording, screen sharing, picture-in-picture, foreground service for ongoing calls, VoIP push via FCM + ConnectionService, audio/video/participant controls, custom UI, and in-call chat. Use in standalone mode (calls is the product) or additive mode (calls layered on top of an existing CometChat Android v5 chat integration).
4
4
  license: "MIT"
5
5
  compatibility: "Android Studio Hedgehog+, JDK 17, Gradle 8+, AGP 8+, minSdk 26+, compileSdk 35; com.cometchat:calls-sdk-android:5.x; com.cometchat:chat-sdk-android:4.x (when ringing)"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "4.0.0"
@@ -22,9 +21,9 @@ Production-grade voice + video calling for native Android v5. Loaded by the `com
22
21
  - `cometchat-android-v5-core` — Chat SDK init, login order, `local.properties` + `BuildConfig` credential conventions, Application class wiring
23
22
 
24
23
  **Ground truth:**
25
- - SDK source — `~/Downloads/calls-sdk/calls-sdk-android-5/sdk/`
26
- - Sample app — `~/Downloads/calls-sdk/calls-sdk-android-5/samples/`
27
- - Pre-authored topic docs — `references/` in this skill (16 docs, ~2300 lines, audited against `calls-sdk-android@5.0.0-beta.2`)
24
+ - SDK source — `calls-sdk-android-5/sdk/`
25
+ - Sample app — `calls-sdk-android-5/samples/`
26
+ - Pre-authored topic docs — `references/` in this skill (16 docs, ~2300 lines, audited against `calls-sdk-android@5.0.x` (v5 GA))
28
27
  - Public docs — https://www.cometchat.com/docs/calls/android/overview
29
28
 
30
29
  ---
@@ -94,7 +93,7 @@ This trapped a real smoke run. The chat skill's `loginAfter` pattern doesn't tra
94
93
  The Chat SDK initiates ringing (`CometChat.initiateCall(...)`); the Calls SDK runs the WebRTC session (`CometChatCalls.joinSession(...)`). They are NOT interchangeable, and there are **two `Call` classes** with the same simple name:
95
94
 
96
95
  - **`com.cometchat.chat.core.Call`** — Chat SDK. Used by `initiateCall`, `acceptCall`, `rejectCall`. Carries `sessionId`, `receiver`, `receiverType`, `callType`. **This is the one you almost always want.**
97
- - **`com.cometchat.chat.models.Call`** Chat SDK message model. Returned in conversation/message-list contexts. Different shape; rarely the right import in calls code.
96
+ - **There is only ONE `Call` class: `com.cometchat.chat.core.Call`** (it extends `BaseMessage`, so it surfaces in conversation/message-list contexts too). There is **no** `com.cometchat.chat.models.Call` do not import that path (it does not exist).
98
97
 
99
98
  ```kotlin
100
99
  // ✓ RIGHT — initiate ringing
@@ -114,14 +113,17 @@ CometChat.initiateCall(outgoing, object : CometChat.CallbackListener<Call>() {
114
113
  // ✓ RIGHT — join the WebRTC session after the receiver accepts
115
114
  import com.cometchat.calls.core.CometChatCalls
116
115
  import com.cometchat.calls.core.CallSession
117
- import com.cometchat.calls.types.SessionType
116
+ import com.cometchat.calls.model.SessionType
118
117
 
119
118
  // SessionSettingsBuilder is a NESTED class on CometChatCalls — access it via
120
119
  // CometChatCalls.SessionSettingsBuilder, NOT a top-level import.
121
120
  // `import com.cometchat.calls.core.SessionSettingsBuilder` fails: no such class.
121
+ // Audio vs video is set via setSessionType(SessionType.VOICE | SessionType.VIDEO).
122
+ // There is NO setIsAudioOnly() method on SessionSettingsBuilder — earlier
123
+ // drafts of this skill cited it; that was wrong. Confirmed against
124
+ // calls-sdk-android 5.0.x (ENG-35698 fix).
122
125
  val settings = CometChatCalls.SessionSettingsBuilder()
123
- .setSessionType(SessionType.VIDEO)
124
- .setIsAudioOnly(false)
126
+ .setSessionType(SessionType.VIDEO) // or SessionType.VOICE for audio-only
125
127
  .build()
126
128
 
127
129
  // 4-arg signature: sessionId (or token), settings, RelativeLayout container, callback.
@@ -136,7 +138,7 @@ CometChatCalls.joinSession(sessionId, settings, callContainer,
136
138
 
137
139
  ```kotlin
138
140
  // ✗ WRONG — wrong Call class
139
- import com.cometchat.chat.models.Call // message-model Call, not the core Call
141
+ import com.cometchat.chat.core.Call // the ONLY Call class (extends BaseMessage)
140
142
  val c = Call(...) // compile-time errors on shape; or worse, runtime ambiguity
141
143
  ```
142
144
 
@@ -161,7 +163,7 @@ Android 14+ silently terminates ongoing-call foreground services that don't decl
161
163
  ```xml
162
164
  <!-- AndroidManifest.xml -->
163
165
  <service
164
- android:name="com.cometchat.calls.service.CometChatOngoingCallService"
166
+ android:name="com.cometchat.calls.services.CometChatOngoingCallService"
165
167
  android:foregroundServiceType="phoneCall|microphone|camera"
166
168
  android:exported="false" />
167
169
  ```
@@ -188,7 +190,13 @@ Required teardown when ending a call:
188
190
 
189
191
  ```kotlin
190
192
  override fun onCallEnded(call: CallSession) {
191
- CallSession.getInstance().leaveSession() // 1. End the Calls SDK session (endSession() doesn't exist on Android)
193
+ // 1. End the Calls SDK session. Canonical v5 teardown is the CallSession
194
+ // INSTANCE method leaveSession(), guarded by isSessionActive — exactly
195
+ // what both calls-sdk-android sample apps use and what the v4→v5 migration
196
+ // guide maps the old static CometChatCalls.endSession() to. Matches this
197
+ // skill's references/call-session.md.
198
+ val session = CallSession.getInstance()
199
+ if (session.isSessionActive) session.leaveSession()
192
200
  callContainer?.removeAllViews() // 2. Detach the WebRTC view
193
201
  audioManager?.mode = AudioManager.MODE_NORMAL // 3. Release audio routing
194
202
  audioManager?.abandonAudioFocusRequest(focusReq) // 4. Abandon audio focus
@@ -269,8 +277,13 @@ class App : Application() {
269
277
  .build()
270
278
  CometChat.init(this, BuildConfig.COMETCHAT_APP_ID, appSettings, /* callback */)
271
279
 
272
- // 2. Calls SDK init — must come after Chat SDK init
273
- val callAppSettings = CallAppSettingsBuilder()
280
+ // 2. Calls SDK init — must come after Chat SDK init.
281
+ //
282
+ // The builder is the NESTED CallAppSettings.CallAppSettingBuilder
283
+ // (note: singular "Setting", not plural). It is NOT a top-level
284
+ // CallAppSettingsBuilder class — earlier drafts of this skill cited
285
+ // that wrong name; verified against calls-sdk-android 5.0.x (ENG-35698).
286
+ val callAppSettings = CallAppSettings.CallAppSettingBuilder()
274
287
  .setAppId(BuildConfig.COMETCHAT_APP_ID)
275
288
  .setRegion(BuildConfig.COMETCHAT_REGION)
276
289
  .build()
@@ -291,14 +304,15 @@ The Calls SDK ships these primitives. Names are stable across v5.x:
291
304
 
292
305
  | Class / type | Purpose | Where it lives |
293
306
  |---|---|---|
294
- | `CometChatCalls` | Top-level facade — init, joinSession, endSession, generateToken | `com.cometchat.calls.core` |
295
- | `CallAppSettingsBuilder` | Init-time config (appId, region, host) | `com.cometchat.calls.core` |
307
+ | `CometChatCalls` | Top-level facade — init, joinSession, generateToken (session teardown is the instance method `CallSession.leaveSession()`, not a static here) | `com.cometchat.calls.core` |
308
+ | `CallAppSettings.CallAppSettingBuilder` | Init-time config (appId, region, host) — **nested** class, singular "Setting" (NOT `CallAppSettingsBuilder`) | `com.cometchat.calls.core` |
309
+ | `GenerateToken` | Wrapper returned by `CometChatCalls.generateToken` — extract the JWT via `.token` (NOT a raw `String`) | `com.cometchat.calls.model` |
296
310
  | `CometChatCalls.SessionSettingsBuilder` | Per-session config (layout, type, hide buttons, audio mode, recording) — **nested class**, access as `CometChatCalls.SessionSettingsBuilder()` |
297
- | `CometChatOngoingCallService` | Foreground service for active calls | `com.cometchat.calls.service` |
298
- | `SessionType` | `VOICE` / `VIDEO` (NOT "AUDIO") | `com.cometchat.calls.types` |
299
- | `LayoutType` | `TILE` / `SIDEBAR` / `SPOTLIGHT` | `com.cometchat.calls.types` |
311
+ | `CometChatOngoingCallService` | Foreground service for active calls | `com.cometchat.calls.services` |
312
+ | `SessionType` | `VOICE` / `VIDEO` (NOT "AUDIO") | `com.cometchat.calls.model` |
313
+ | `LayoutType` | `TILE` / `SIDEBAR` / `SPOTLIGHT` | `com.cometchat.calls.model` |
300
314
  | `CallLogRequest.CallLogRequestBuilder` | Paginated call history fetcher | `com.cometchat.calls.core` |
301
- | `CometChatCallsEventsListener` | Lifecycle + media + participant + button-click | `com.cometchat.calls.listeners` |
315
+ | `SessionStatusListener` / `ParticipantEventListener` / `MediaEventsListener` / `ButtonClickListener` / `LayoutListener` | The **five** v5 call-event listeners register each on the `CallSession` instance (`callSession.addSessionStatusListener(...)` etc.). v5 split the old monolithic `CometChatCallsEventsListener` into these. See `references/event-listeners.md`. | `com.cometchat.calls.listeners` |
302
316
 
303
317
  In additive mode, `chatuikit-android`'s `CometChatMessageHeader` already exposes call buttons — see `cometchat-android-v5-components` for the kit-side view.
304
318
 
@@ -314,7 +328,7 @@ When `product === "voice-video"` and there is no existing chat integration.
314
328
 
315
329
  ### 4a. Standalone — Session mode (meeting-room UX, no ringing)
316
330
 
317
- Calls SDK ONLY. NO Chat SDK, NO ConnectionService, NO FCM-for-VoIP. Matches `~/Downloads/calls-sdk/calls-sdk-android-5/samples/sample-app/`. Scaffold:
331
+ Calls SDK ONLY. NO Chat SDK, NO ConnectionService, NO FCM-for-VoIP. Matches `calls-sdk-android-5/samples/sample-app/`. Scaffold:
318
332
 
319
333
  1. **`Application` class** — `CometChatCalls.init(...)` ONLY in `onCreate`. No `CometChat.init`, no PhoneAccount, no ConnectionService.
320
334
  2. **`JoinSessionActivity`** — UID picker + Start/Join meeting + state.
@@ -357,7 +371,7 @@ Important: do NOT re-add `chat-sdk-android` or `chatuikit-android` to `build.gra
357
371
 
358
372
  ## 6. Anti-patterns
359
373
 
360
- 1. **Calling `CometChatCalls.joinSession()` with the wrong `Call` import.** Compile errors are obvious; the dangerous case is when an agent imports `com.cometchat.chat.models.Call` and casts it. Cross-reference rule 1.1.
374
+ 1. **Calling `CometChatCalls.joinSession()` with the wrong `Call` import.** Compile errors are obvious; the dangerous case is inventing a non-existent `com.cometchat.chat.models.Call` import the only Call class is `com.cometchat.chat.core.Call`. Cross-reference rule 1.1.
361
375
 
362
376
  2. **Hardcoding `SessionType.AUDIO`.** No such constant exists. The voice path is `SessionType.VOICE`. Listed here because it's the most common cargo-culted mistake — the iOS SDK uses "audio" terminology.
363
377
 
@@ -387,7 +401,7 @@ After scaffolding, verify (the skill writes Espresso-style smoke tests where pos
387
401
  - [ ] All three `FOREGROUND_SERVICE_*` Android 14+ permissions in `AndroidManifest.xml`
388
402
  - [ ] `CometChatOngoingCallService` with `foregroundServiceType="phoneCall|microphone|camera"`
389
403
  - [ ] Call listener registration uses a stable string ID
390
- - [ ] Hangup path includes `endSession()` + `removeAllViews()` + audio-focus abandon + service stop + finish (rule 1.5)
404
+ - [ ] Hangup path includes `CallSession.getInstance().leaveSession()` (guarded by `isSessionActive`) + `removeAllViews()` + audio-focus abandon + service stop + finish (rule 1.5)
391
405
  - [ ] **Standalone only:** `ConnectionService` subclass + `PhoneAccount` registration + FCM `MessagingService` for incoming-call data messages
392
406
  - [ ] **Standalone only:** Call listener registered in `Application.onCreate`, not an activity
393
407
 
@@ -46,7 +46,7 @@ Each skill has a `description` field in its YAML frontmatter that lists trigger
46
46
 
47
47
  ## Compatibility
48
48
 
49
- - CometChat Calls SDK v5 (5.0.0-beta.2+)
49
+ - CometChat Calls SDK v5 (5.0.+ GA)
50
50
  - CometChat Chat SDK v4 (4.0.+) — required for ringing and VoIP
51
51
  - Kotlin, Java 17
52
52
  - Gradle KTS, compileSdk 35, minSdk 26
@@ -96,10 +96,12 @@ After your existing login flow:
96
96
  ```kotlin
97
97
  CometChat.login(uid, authKey, object : CometChat.CallbackListener<User>() {
98
98
  override fun onSuccess(user: User) {
99
- val authToken = user.authToken
100
- CometChatCalls.login(authToken, object : CometChatCalls.CallbackListener<User>() {
101
- override fun onSuccess(user: User) { /* calls SDK ready */ }
102
- override fun onError(e: CometChatException) {}
99
+ // Calls SDK login uses the SAME uid + authKey (the chat `User` has no
100
+ // `authToken` accessor if you need a token it's the static
101
+ // `CometChat.getUserAuthToken()`). Callback type is CallUser, not User.
102
+ CometChatCalls.login(uid, authKey, object : CometChatCalls.CallbackListener<CallUser>() {
103
+ override fun onSuccess(callUser: CallUser) { /* calls SDK ready */ }
104
+ override fun onError(e: com.cometchat.calls.exceptions.CometChatException) {}
103
105
  })
104
106
  }
105
107
  override fun onError(e: CometChatException) {}
@@ -163,7 +165,7 @@ Register in manifest:
163
165
 
164
166
  ```kotlin
165
167
  fun endCall(sessionId: String) {
166
- CometChatCalls.leaveSession()
168
+ CometChatCalls.endSession() // static teardown (there is NO static CometChatCalls.leaveSession() — leaveSession is instance-only on CallSession.getInstance())
167
169
  CometChat.endCall(sessionId, object : CometChat.CallbackListener<Call>() { /* ... */ })
168
170
  // ConnectionService disconnect
169
171
  activeConnection?.setDisconnected(DisconnectCause(DisconnectCause.LOCAL))
@@ -26,7 +26,7 @@ import com.cometchat.calls.listeners.MediaEventsListener
26
26
  val callSession = CallSession.getInstance()
27
27
 
28
28
  callSession.muteAudio() // mute microphone
29
- callSession.unMuteAudio() // unmute microphone
29
+ callSession.unmuteAudio() // unmute microphone
30
30
  ```
31
31
 
32
32
  ### Switch Audio Output
@@ -61,10 +61,10 @@ callSession.addMediaEventsListener(this, object : MediaEventsListener() {
61
61
  override fun onVideoResumed() {}
62
62
  override fun onRecordingStarted() {}
63
63
  override fun onRecordingStopped() {}
64
- override fun onScreenShareStarted() {}
65
- override fun onScreenShareStopped() {}
66
64
  override fun onCameraFacingChanged(facing: CameraFacing) {}
67
65
  })
66
+ // Screen-share is observed via ParticipantEventListener.onParticipantStartedScreenShare /
67
+ // onParticipantStoppedScreenShare — NOT MediaEventsListener.
68
68
  ```
69
69
 
70
70
  ### Initial Audio Settings (Pre-Session)
@@ -80,7 +80,7 @@ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
80
80
 
81
81
  ## Gotchas
82
82
 
83
- - `muteAudio()` / `unMuteAudio()` only work during an active session
83
+ - `muteAudio()` / `unmuteAudio()` only work during an active session
84
84
  - Audio mode changes trigger `onAudioModeChanged()` on `MediaEventsListener`
85
85
  - `AudioMode` enum: `SPEAKER`, `EARPIECE`, `BLUETOOTH`, `HEADPHONES`
86
86
  - For voice calls, default to `AudioMode.EARPIECE`; for video calls, default to `AudioMode.SPEAKER`
@@ -10,27 +10,29 @@ Same three layouts (TILE/SIDEBAR/SPOTLIGHT). Android V5 uses Java/Kotlin builder
10
10
  ## SDK API
11
11
 
12
12
  ```kotlin
13
- import com.cometchat.calls.constants.CometChatCallsConstants
14
- import com.cometchat.calls.core.CallSettingsBuilder
15
13
  import com.cometchat.calls.core.CometChatCalls
16
-
17
- val settings = CallSettingsBuilder(activity)
18
- .setSessionType(CometChatCallsConstants.SESSION_TYPE_VIDEO)
19
- .setLayout(CometChatCallsConstants.LAYOUT_TILE) // _TILE | _SIDEBAR | _SPOTLIGHT
20
- .setHideChangeLayoutButton(false)
14
+ import com.cometchat.calls.listeners.LayoutListener
15
+ import com.cometchat.calls.model.SessionType
16
+ import com.cometchat.calls.model.LayoutType
17
+
18
+ val settings = CometChatCalls.SessionSettingsBuilder()
19
+ .setSessionType(SessionType.VIDEO)
20
+ .setLayout(LayoutType.TILE) // TILE | SIDEBAR | SPOTLIGHT
21
+ .hideChangeLayoutButton(false)
21
22
  .build()
22
23
 
23
- // Mid-call switch
24
- CometChatCalls.setLayout(CometChatCallsConstants.LAYOUT_SPOTLIGHT)
25
-
26
- // Listen
27
- val callsEventListener = object : CometChatCallsEventsListener {
28
- override fun onCallLayoutChanged(layout: String) {
24
+ // There is no static mid-call setter in v5. Layout is set at join via
25
+ // SessionSettingsBuilder.setLayout(...); to change it mid-call, re-join the
26
+ // session with a new SessionSettingsBuilder. Layout CHANGES are observed
27
+ // via LayoutListener.onCallLayoutChanged(layoutType) — register on the
28
+ // CallSession instance returned from joinSession's onSuccess callback.
29
+ callSession.addLayoutListener(this, object : LayoutListener() {
30
+ override fun onCallLayoutChanged(layoutType: LayoutType) {
29
31
  activity.runOnUiThread {
30
32
  // Update segmented button state
31
33
  }
32
34
  }
33
- }
35
+ })
34
36
  ```
35
37
 
36
38
  ---
@@ -72,21 +74,27 @@ binding.layoutToggle.addOnButtonCheckedListener { _, checkedId, isChecked ->
72
74
  if (!isChecked) return@addOnButtonCheckedListener
73
75
 
74
76
  val layout = when (checkedId) {
75
- R.id.layoutTile -> CometChatCallsConstants.LAYOUT_TILE
76
- R.id.layoutSidebar -> CometChatCallsConstants.LAYOUT_SIDEBAR
77
- R.id.layoutSpotlight -> CometChatCallsConstants.LAYOUT_SPOTLIGHT
77
+ R.id.layoutTile -> LayoutType.TILE
78
+ R.id.layoutSidebar -> LayoutType.SIDEBAR
79
+ R.id.layoutSpotlight -> LayoutType.SPOTLIGHT
78
80
  else -> return@addOnButtonCheckedListener
79
81
  }
80
- CometChatCalls.setLayout(layout)
82
+ // v5 has no static mid-call setter — re-join the session with new settings
83
+ // to apply the chosen layout.
84
+ val settings = CometChatCalls.SessionSettingsBuilder()
85
+ .setSessionType(SessionType.VIDEO)
86
+ .setLayout(layout)
87
+ .build()
88
+ // CometChatCalls.joinSession(sessionId, callToken, settings, ...) — see join-session.md
81
89
  }
82
90
 
83
- // Sync from kit's switcher
84
- override fun onCallLayoutChanged(layout: String) {
91
+ // Sync from kit's switcher — observed via LayoutListener.onCallLayoutChanged
92
+ override fun onCallLayoutChanged(layoutType: LayoutType) {
85
93
  runOnUiThread {
86
- val id = when (layout) {
87
- CometChatCallsConstants.LAYOUT_TILE -> R.id.layoutTile
88
- CometChatCallsConstants.LAYOUT_SIDEBAR -> R.id.layoutSidebar
89
- CometChatCallsConstants.LAYOUT_SPOTLIGHT -> R.id.layoutSpotlight
94
+ val id = when (layoutType) {
95
+ LayoutType.TILE -> R.id.layoutTile
96
+ LayoutType.SIDEBAR -> R.id.layoutSidebar
97
+ LayoutType.SPOTLIGHT -> R.id.layoutSpotlight
90
98
  else -> return@runOnUiThread
91
99
  }
92
100
  binding.layoutToggle.check(id)
@@ -108,7 +116,7 @@ Web sister rules apply, plus Android-specific:
108
116
 
109
117
  ## Verification checklist
110
118
 
111
- - [ ] Initial layout via `setLayout` on builder
119
+ - [ ] Initial layout via `setLayout(LayoutType.X)` on `SessionSettingsBuilder`
112
120
  - [ ] `MaterialButtonToggleGroup` with `singleSelection="true"`
113
121
  - [ ] `addOnButtonCheckedListener` guards on `isChecked`
114
122
  - [ ] `onCallLayoutChanged` updates toggle group on UI thread
@@ -1,6 +1,6 @@
1
1
  # Call session — joinSession with no ringing (Android V5 / Views)
2
2
 
3
- Server-generated sessionId, both parties enter it. Customer-validated against `~/Downloads/calls-sdk/calls-sdk-android-5/samples/sample-app/src/main/kotlin/com/cometchat/samplecalls/ui/activity/CallActivity.kt`.
3
+ Server-generated sessionId, both parties enter it. Customer-validated against `calls-sdk-android-5/samples/sample-app/src/main/kotlin/com/cometchat/samplecalls/ui/activity/CallActivity.kt`.
4
4
 
5
5
  **Read first:** `cometchat-react-calls/references/call-session.md` — cross-platform architecture (sessionId strategies, server-side authorization). Then come back here for the Android shape.
6
6
 
@@ -270,5 +270,5 @@ See `cometchat-android-v5-calls/references/share-invite.md` for full deep-link c
270
270
  - `cometchat-react-calls/references/call-session.md` — cross-platform architecture
271
271
  - `cometchat-android-v5-calls/SKILL.md` — Android V5 architecture
272
272
  - `cometchat-android-v5-calls/references/share-invite.md` — App Links config
273
- - Upstream Android sample — `~/Downloads/calls-sdk/calls-sdk-android-5/samples/sample-app/src/main/kotlin/com/cometchat/samplecalls/ui/activity/CallActivity.kt`
273
+ - Upstream Android sample — `calls-sdk-android-5/samples/sample-app/src/main/kotlin/com/cometchat/samplecalls/ui/activity/CallActivity.kt`
274
274
  - Canonical docs: https://www.cometchat.com/docs/calls/android/join-session
@@ -46,7 +46,7 @@ var isAudioMuted = false
46
46
  var isVideoPaused = false
47
47
 
48
48
  btnMute.setOnClickListener {
49
- if (isAudioMuted) callSession.unMuteAudio() else callSession.muteAudio()
49
+ if (isAudioMuted) callSession.unmuteAudio() else callSession.muteAudio()
50
50
  }
51
51
  btnVideo.setOnClickListener {
52
52
  if (isVideoPaused) callSession.resumeVideo() else callSession.pauseVideo()
@@ -98,8 +98,8 @@ callSession.addParticipantEventListener(this, object : ParticipantEventListener(
98
98
  adapter.onMuteClick = { participant -> callSession.muteParticipant(participant.uid) }
99
99
  adapter.onPauseVideoClick = { participant -> callSession.pauseParticipantVideo(participant.uid) }
100
100
  adapter.onPinClick = { participant ->
101
- if (participant.isPinned) callSession.unPinParticipant()
102
- else callSession.pinParticipant(participant.uid)
101
+ if (participant.isPinned) callSession.unpinParticipant()
102
+ else callSession.pinParticipant(participant.uid) // per official docs (calls/android/participant-management)
103
103
  }
104
104
  ```
105
105
 
@@ -124,13 +124,13 @@ callSession.addLayoutListener(this, object : LayoutListener() {
124
124
 
125
125
  | Action | Method |
126
126
  |--------|--------|
127
- | Mute/unmute audio | `muteAudio()`, `unMuteAudio()` |
127
+ | Mute/unmute audio | `muteAudio()`, `unmuteAudio()` |
128
128
  | Pause/resume video | `pauseVideo()`, `resumeVideo()` |
129
129
  | Switch camera | `switchCamera()` |
130
130
  | Change audio output | `setAudioMode(AudioMode)` |
131
131
  | Change layout | `setLayout(LayoutType)` |
132
132
  | Start/stop recording | `startRecording()`, `stopRecording()` |
133
- | Pin/unpin participant | `pinParticipant(uid)`, `unPinParticipant()` |
133
+ | Pin/unpin participant | `pinParticipant(uid)`, `unpinParticipant()` |
134
134
  | Mute participant | `muteParticipant(uid)` |
135
135
  | Pause participant video | `pauseParticipantVideo(uid)` |
136
136
  | Leave session | `leaveSession()` |
@@ -73,11 +73,11 @@ callSession.addMediaEventsListener(this, object : MediaEventsListener() {
73
73
  override fun onVideoResumed() {}
74
74
  override fun onRecordingStarted() {}
75
75
  override fun onRecordingStopped() {}
76
- override fun onScreenShareStarted() {}
77
- override fun onScreenShareStopped() {}
78
76
  override fun onAudioModeChanged(audioMode: AudioMode) {}
79
77
  override fun onCameraFacingChanged(facing: CameraFacing) {}
80
78
  })
79
+ // Screen-share is observed on ParticipantEventListener (onParticipantStartedScreenShare /
80
+ // onParticipantStoppedScreenShare above) — NOT MediaEventsListener.
81
81
  ```
82
82
 
83
83
  ### 4. ButtonClickListener
@@ -1,6 +1,6 @@
1
1
  # Idle timeout on Android V5
2
2
 
3
- SDK API: SessionSettingsBuilder setters + listener event. ViewModel + StateFlow pattern (cf. `references/raise-hand.md`). Material AlertDialog or BottomSheet for the prompt.
3
+ SDK API: SessionSettingsBuilder setter + listener event. ViewModel + StateFlow pattern (cf. `references/raise-hand.md`). Material AlertDialog or BottomSheet for the prompt.
4
4
 
5
5
  **Canonical docs:** https://www.cometchat.com/docs/calls/android/idle-timeout
6
6
  **Read first:** `cometchat-react-calls/references/idle-timeout.md` — settings + archetype timeouts.
@@ -10,26 +10,32 @@ SDK API: SessionSettingsBuilder setters + listener event. ViewModel + StateFlow
10
10
  ## SDK API
11
11
 
12
12
  ```kotlin
13
- import com.cometchat.calls.core.SessionSettingsBuilder
14
- import com.cometchat.calls.core.SessionType
13
+ import com.cometchat.calls.core.CometChatCalls
14
+ import com.cometchat.calls.model.SessionType
15
15
 
16
- val settings = SessionSettingsBuilder(context, callContainer)
16
+ val settings = CometChatCalls.SessionSettingsBuilder()
17
17
  .setSessionType(SessionType.VIDEO)
18
- .setIdleTimeoutPeriodBeforePrompt(60_000)
19
- .setIdleTimeoutPeriodAfterPrompt(120_000)
18
+ .setIdleTimeoutPeriod(60) // SECONDS (= 60s). single setter — no before/after-prompt pair. default 300
20
19
  .build()
21
20
  ```
22
21
 
23
- Listenerimplement on `CometChatCallsEventsListener`:
22
+ > **⚠ Unit footgun Android takes SECONDS, not milliseconds.** `setIdleTimeoutPeriod(int)` is in **seconds** (default `300` = 5 min; docs: calls/android/idle-timeout). This differs from the **web / React Native / Angular** Calls SDK, whose `SessionSettings.idleTimeoutPeriodBeforePrompt/AfterPrompt` are in **milliseconds**. Copying a web value like `60000` here sets a ~16.7-hour timeout, not 60 seconds. Use `60` for one minute.
23
+
24
+ Listener — `onSessionTimedOut()` lives on `SessionStatusListener` in v5.
25
+ Register on the `CallSession` instance from `joinSession`'s `onSuccess`:
24
26
 
25
27
  ```kotlin
26
- override fun onSessionTimedOut() {
27
- // Runs on background thread — dispatch to main
28
- runOnUiThread {
29
- Toast.makeText(this, "Call ended due to inactivity", Toast.LENGTH_LONG).show()
30
- finish() // or NavController.popBackStack()
28
+ import com.cometchat.calls.listeners.SessionStatusListener
29
+
30
+ callSession.addSessionStatusListener(this, object : SessionStatusListener() {
31
+ override fun onSessionTimedOut() {
32
+ // Runs on background thread — dispatch to main
33
+ runOnUiThread {
34
+ Toast.makeText(this@CallActivity, "Call ended due to inactivity", Toast.LENGTH_LONG).show()
35
+ finish() // or NavController.popBackStack()
36
+ }
31
37
  }
32
- }
38
+ })
33
39
  ```
34
40
 
35
41
  ---
@@ -95,7 +101,7 @@ Web sister rules + Android-specific:
95
101
 
96
102
  ## Verification checklist
97
103
 
98
- - [ ] SessionSettingsBuilder sets both idle periods
104
+ - [ ] SessionSettingsBuilder sets the idle period via `setIdleTimeoutPeriod(...)`
99
105
  - [ ] `onSessionTimedOut` dispatches to main thread (`runOnUiThread` or coroutine)
100
106
  - [ ] Dialog uses `setCancelable(false)`
101
107
  - [ ] Listener attached in `onCreate`/`onResume`, detached in matching teardown
@@ -16,7 +16,7 @@ Add real-time text messaging during calls. Uses a CometChat Group (GUID = sessio
16
16
  - Dependencies:
17
17
  ```kotlin
18
18
  implementation("com.cometchat:chat-sdk-android:4.0.+")
19
- implementation("com.cometchat:calls-sdk-android:5.0.0-beta.2")
19
+ implementation("com.cometchat:calls-sdk-android:5.0.+")
20
20
  implementation("com.cometchat:chat-uikit-android:4.+")
21
21
  ```
22
22