@cometchat/skills 4.1.0 → 4.2.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 (257) hide show
  1. package/bin/install.js +298 -41
  2. package/package.json +1 -1
  3. package/skills/cometchat/SKILL.md +146 -27
  4. package/skills/cometchat-a11y/SKILL.md +476 -0
  5. package/skills/cometchat-android-v5/SKILL.md +1 -1
  6. package/skills/cometchat-android-v5-calls/SKILL.md +413 -0
  7. package/skills/cometchat-android-v5-calls/references/README.md +53 -0
  8. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +195 -0
  9. package/skills/cometchat-android-v5-calls/references/audio-controls.md +91 -0
  10. package/skills/cometchat-android-v5-calls/references/background-handling.md +168 -0
  11. package/skills/cometchat-android-v5-calls/references/call-layouts.md +123 -0
  12. package/skills/cometchat-android-v5-calls/references/call-logs.md +113 -0
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +274 -0
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +150 -0
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +123 -0
  16. package/skills/cometchat-android-v5-calls/references/group-calls.md +205 -0
  17. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +111 -0
  18. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +134 -0
  19. package/skills/cometchat-android-v5-calls/references/join-session.md +120 -0
  20. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +206 -0
  21. package/skills/cometchat-android-v5-calls/references/participant-management.md +110 -0
  22. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +106 -0
  23. package/skills/cometchat-android-v5-calls/references/raise-hand.md +242 -0
  24. package/skills/cometchat-android-v5-calls/references/recording.md +101 -0
  25. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +152 -0
  26. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +82 -0
  27. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +215 -0
  28. package/skills/cometchat-android-v5-calls/references/session-settings.md +121 -0
  29. package/skills/cometchat-android-v5-calls/references/setup.md +137 -0
  30. package/skills/cometchat-android-v5-calls/references/share-invite.md +151 -0
  31. package/skills/cometchat-android-v5-calls/references/video-controls.md +87 -0
  32. package/skills/cometchat-android-v5-calls/references/voip-calling.md +526 -0
  33. package/skills/cometchat-android-v5-components/SKILL.md +1 -1
  34. package/skills/cometchat-android-v5-core/SKILL.md +1 -1
  35. package/skills/cometchat-android-v5-customization/SKILL.md +1 -1
  36. package/skills/cometchat-android-v5-extensions/SKILL.md +1 -1
  37. package/skills/cometchat-android-v5-features/SKILL.md +1 -1
  38. package/skills/cometchat-android-v5-placement/SKILL.md +1 -1
  39. package/skills/cometchat-android-v5-production/SKILL.md +1 -1
  40. package/skills/cometchat-android-v5-push/SKILL.md +1 -1
  41. package/skills/cometchat-android-v5-testing/SKILL.md +1 -1
  42. package/skills/cometchat-android-v5-theming/SKILL.md +1 -1
  43. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +1 -1
  44. package/skills/cometchat-android-v6/SKILL.md +1 -1
  45. package/skills/cometchat-android-v6-builder-settings/SKILL.md +1 -1
  46. package/skills/cometchat-android-v6-calls/SKILL.md +375 -0
  47. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +97 -0
  48. package/skills/cometchat-android-v6-calls/references/call-layouts.md +91 -0
  49. package/skills/cometchat-android-v6-calls/references/call-session.md +163 -0
  50. package/skills/cometchat-android-v6-calls/references/device-management.md +171 -0
  51. package/skills/cometchat-android-v6-calls/references/group-calls.md +191 -0
  52. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +107 -0
  53. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +136 -0
  54. package/skills/cometchat-android-v6-calls/references/raise-hand.md +186 -0
  55. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +176 -0
  56. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +127 -0
  57. package/skills/cometchat-android-v6-calls/references/share-invite.md +105 -0
  58. package/skills/cometchat-android-v6-compose-components/SKILL.md +2 -2
  59. package/skills/cometchat-android-v6-compose-customization/SKILL.md +1 -1
  60. package/skills/cometchat-android-v6-compose-placement/SKILL.md +1 -1
  61. package/skills/cometchat-android-v6-compose-theming/SKILL.md +1 -1
  62. package/skills/cometchat-android-v6-core/SKILL.md +1 -1
  63. package/skills/cometchat-android-v6-events/SKILL.md +1 -1
  64. package/skills/cometchat-android-v6-extensions/SKILL.md +1 -1
  65. package/skills/cometchat-android-v6-features/SKILL.md +1 -1
  66. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +1 -1
  67. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +1 -1
  68. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +1 -1
  69. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +1 -1
  70. package/skills/cometchat-android-v6-migration/SKILL.md +398 -0
  71. package/skills/cometchat-android-v6-production/SKILL.md +1 -1
  72. package/skills/cometchat-android-v6-push/SKILL.md +1 -1
  73. package/skills/cometchat-android-v6-testing/SKILL.md +1 -1
  74. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +1 -1
  75. package/skills/cometchat-angular-calls/SKILL.md +511 -0
  76. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +95 -0
  77. package/skills/cometchat-angular-calls/references/call-layouts.md +106 -0
  78. package/skills/cometchat-angular-calls/references/call-session.md +167 -0
  79. package/skills/cometchat-angular-calls/references/custom-ui.md +231 -0
  80. package/skills/cometchat-angular-calls/references/device-management.md +135 -0
  81. package/skills/cometchat-angular-calls/references/group-calls.md +412 -0
  82. package/skills/cometchat-angular-calls/references/idle-timeout.md +145 -0
  83. package/skills/cometchat-angular-calls/references/in-call-chat.md +148 -0
  84. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +205 -0
  85. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +53 -0
  86. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +183 -0
  87. package/skills/cometchat-angular-calls/references/picture-in-picture.md +285 -0
  88. package/skills/cometchat-angular-calls/references/raise-hand.md +167 -0
  89. package/skills/cometchat-angular-calls/references/recording-screen-share.md +267 -0
  90. package/skills/cometchat-angular-calls/references/ringing-integration.md +131 -0
  91. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +100 -0
  92. package/skills/cometchat-angular-calls/references/share-invite.md +116 -0
  93. package/skills/cometchat-angular-components/SKILL.md +1 -1
  94. package/skills/cometchat-angular-core/SKILL.md +1 -1
  95. package/skills/cometchat-angular-customization/SKILL.md +1 -1
  96. package/skills/cometchat-angular-features/SKILL.md +1 -1
  97. package/skills/cometchat-angular-patterns/SKILL.md +1 -1
  98. package/skills/cometchat-angular-placement/SKILL.md +1 -1
  99. package/skills/cometchat-angular-production/SKILL.md +1 -1
  100. package/skills/cometchat-angular-push/SKILL.md +403 -0
  101. package/skills/cometchat-angular-testing/SKILL.md +333 -0
  102. package/skills/cometchat-angular-theming/SKILL.md +1 -1
  103. package/skills/cometchat-angular-troubleshooting/SKILL.md +1 -1
  104. package/skills/cometchat-astro-patterns/SKILL.md +1 -1
  105. package/skills/cometchat-calls/SKILL.md +358 -0
  106. package/skills/cometchat-calls/references/use-case-broadcast.md +194 -0
  107. package/skills/cometchat-calls/references/use-case-marketplace.md +158 -0
  108. package/skills/cometchat-calls/references/use-case-support.md +190 -0
  109. package/skills/cometchat-calls/references/use-case-team.md +169 -0
  110. package/skills/cometchat-calls/references/use-case-telehealth.md +154 -0
  111. package/skills/cometchat-components/SKILL.md +1 -1
  112. package/skills/cometchat-core/SKILL.md +1 -1
  113. package/skills/cometchat-customization/SKILL.md +2 -2
  114. package/skills/cometchat-features/SKILL.md +2 -2
  115. package/skills/cometchat-flutter-v5/SKILL.md +1 -1
  116. package/skills/cometchat-flutter-v5-calls/SKILL.md +325 -94
  117. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +169 -0
  118. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +98 -0
  119. package/skills/cometchat-flutter-v5-calls/references/call-session.md +330 -0
  120. package/skills/cometchat-flutter-v5-calls/references/device-management.md +120 -0
  121. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +187 -0
  122. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +97 -0
  123. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +132 -0
  124. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +160 -0
  125. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +244 -0
  126. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +193 -0
  127. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +101 -0
  128. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +142 -0
  129. package/skills/cometchat-flutter-v5-conversations/SKILL.md +1 -1
  130. package/skills/cometchat-flutter-v5-core/SKILL.md +1 -1
  131. package/skills/cometchat-flutter-v5-customization/SKILL.md +1 -1
  132. package/skills/cometchat-flutter-v5-events/SKILL.md +1 -1
  133. package/skills/cometchat-flutter-v5-messages/SKILL.md +1 -1
  134. package/skills/cometchat-flutter-v5-production/SKILL.md +1 -1
  135. package/skills/cometchat-flutter-v5-push/SKILL.md +1 -1
  136. package/skills/cometchat-flutter-v5-testing/SKILL.md +390 -0
  137. package/skills/cometchat-flutter-v5-theming/SKILL.md +1 -1
  138. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +1 -1
  139. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +1 -1
  140. package/skills/cometchat-flutter-v6/SKILL.md +1 -1
  141. package/skills/cometchat-flutter-v6-calls/SKILL.md +308 -243
  142. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +134 -0
  143. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +102 -0
  144. package/skills/cometchat-flutter-v6-calls/references/call-session.md +229 -0
  145. package/skills/cometchat-flutter-v6-calls/references/device-management.md +99 -0
  146. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +190 -0
  147. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +80 -0
  148. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +122 -0
  149. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +268 -0
  150. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +171 -0
  151. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +93 -0
  152. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +102 -0
  153. package/skills/cometchat-flutter-v6-components/SKILL.md +1 -1
  154. package/skills/cometchat-flutter-v6-conversations/SKILL.md +1 -1
  155. package/skills/cometchat-flutter-v6-core/SKILL.md +1 -1
  156. package/skills/cometchat-flutter-v6-customization/SKILL.md +1 -1
  157. package/skills/cometchat-flutter-v6-events/SKILL.md +1 -1
  158. package/skills/cometchat-flutter-v6-features/SKILL.md +1 -1
  159. package/skills/cometchat-flutter-v6-messages/SKILL.md +1 -1
  160. package/skills/cometchat-flutter-v6-migration/SKILL.md +1 -1
  161. package/skills/cometchat-flutter-v6-placement/SKILL.md +1 -1
  162. package/skills/cometchat-flutter-v6-production/SKILL.md +1 -1
  163. package/skills/cometchat-flutter-v6-push/SKILL.md +452 -0
  164. package/skills/cometchat-flutter-v6-testing/SKILL.md +319 -0
  165. package/skills/cometchat-flutter-v6-theming/SKILL.md +1 -1
  166. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +1 -1
  167. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +1 -1
  168. package/skills/cometchat-i18n/SKILL.md +358 -0
  169. package/skills/cometchat-ios/SKILL.md +5 -5
  170. package/skills/cometchat-ios-calls/SKILL.md +409 -0
  171. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +172 -0
  172. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +189 -0
  173. package/skills/cometchat-ios-calls/references/call-layouts.md +136 -0
  174. package/skills/cometchat-ios-calls/references/call-session.md +221 -0
  175. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +353 -0
  176. package/skills/cometchat-ios-calls/references/custom-ui.md +322 -0
  177. package/skills/cometchat-ios-calls/references/device-management.md +171 -0
  178. package/skills/cometchat-ios-calls/references/group-calls.md +396 -0
  179. package/skills/cometchat-ios-calls/references/idle-timeout.md +185 -0
  180. package/skills/cometchat-ios-calls/references/in-call-chat.md +183 -0
  181. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +138 -0
  182. package/skills/cometchat-ios-calls/references/picture-in-picture.md +246 -0
  183. package/skills/cometchat-ios-calls/references/raise-hand.md +239 -0
  184. package/skills/cometchat-ios-calls/references/recording-screen-share.md +339 -0
  185. package/skills/cometchat-ios-calls/references/ringing-integration.md +142 -0
  186. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +267 -0
  187. package/skills/cometchat-ios-calls/references/share-invite.md +152 -0
  188. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +246 -0
  189. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +166 -0
  190. package/skills/cometchat-ios-components/SKILL.md +1 -1
  191. package/skills/cometchat-ios-core/SKILL.md +1 -1
  192. package/skills/cometchat-ios-customization/SKILL.md +1 -1
  193. package/skills/cometchat-ios-features/SKILL.md +1 -1
  194. package/skills/cometchat-ios-placement/SKILL.md +1 -1
  195. package/skills/cometchat-ios-production/SKILL.md +1 -1
  196. package/skills/cometchat-ios-push/SKILL.md +1 -1
  197. package/skills/cometchat-ios-testing/SKILL.md +371 -0
  198. package/skills/cometchat-ios-theming/SKILL.md +1 -1
  199. package/skills/cometchat-ios-troubleshooting/SKILL.md +1 -1
  200. package/skills/cometchat-native-bare-patterns/SKILL.md +45 -3
  201. package/skills/cometchat-native-calls/SKILL.md +599 -0
  202. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +203 -0
  203. package/skills/cometchat-native-calls/references/call-layouts.md +124 -0
  204. package/skills/cometchat-native-calls/references/call-session.md +182 -0
  205. package/skills/cometchat-native-calls/references/custom-ui.md +250 -0
  206. package/skills/cometchat-native-calls/references/device-management.md +135 -0
  207. package/skills/cometchat-native-calls/references/expo-vs-bare.md +179 -0
  208. package/skills/cometchat-native-calls/references/group-calls.md +291 -0
  209. package/skills/cometchat-native-calls/references/idle-timeout.md +128 -0
  210. package/skills/cometchat-native-calls/references/in-call-chat.md +143 -0
  211. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +72 -0
  212. package/skills/cometchat-native-calls/references/picture-in-picture.md +276 -0
  213. package/skills/cometchat-native-calls/references/raise-hand.md +203 -0
  214. package/skills/cometchat-native-calls/references/recording-screen-share.md +290 -0
  215. package/skills/cometchat-native-calls/references/ringing-integration.md +118 -0
  216. package/skills/cometchat-native-calls/references/server-push-bridge.md +135 -0
  217. package/skills/cometchat-native-calls/references/server-push-payloads.md +193 -0
  218. package/skills/cometchat-native-calls/references/share-invite.md +144 -0
  219. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +317 -0
  220. package/skills/cometchat-native-components/SKILL.md +1 -1
  221. package/skills/cometchat-native-core/SKILL.md +1 -1
  222. package/skills/cometchat-native-customization/SKILL.md +1 -1
  223. package/skills/cometchat-native-expo-patterns/SKILL.md +18 -1
  224. package/skills/cometchat-native-features/SKILL.md +1 -1
  225. package/skills/cometchat-native-placement/SKILL.md +1 -1
  226. package/skills/cometchat-native-production/SKILL.md +1 -1
  227. package/skills/cometchat-native-push/SKILL.md +1 -1
  228. package/skills/cometchat-native-testing/SKILL.md +1 -1
  229. package/skills/cometchat-native-theming/SKILL.md +1 -1
  230. package/skills/cometchat-native-troubleshooting/SKILL.md +1 -1
  231. package/skills/cometchat-nextjs-patterns/SKILL.md +1 -1
  232. package/skills/cometchat-placement/SKILL.md +1 -1
  233. package/skills/cometchat-production/SKILL.md +1 -1
  234. package/skills/cometchat-react-calls/SKILL.md +539 -0
  235. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +145 -0
  236. package/skills/cometchat-react-calls/references/call-layouts.md +161 -0
  237. package/skills/cometchat-react-calls/references/call-session.md +235 -0
  238. package/skills/cometchat-react-calls/references/custom-ui.md +201 -0
  239. package/skills/cometchat-react-calls/references/device-management.md +206 -0
  240. package/skills/cometchat-react-calls/references/group-calls.md +262 -0
  241. package/skills/cometchat-react-calls/references/idle-timeout.md +175 -0
  242. package/skills/cometchat-react-calls/references/in-call-chat.md +212 -0
  243. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +172 -0
  244. package/skills/cometchat-react-calls/references/picture-in-picture.md +245 -0
  245. package/skills/cometchat-react-calls/references/raise-hand.md +238 -0
  246. package/skills/cometchat-react-calls/references/recording-screen-share.md +143 -0
  247. package/skills/cometchat-react-calls/references/ringing-integration.md +255 -0
  248. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +241 -0
  249. package/skills/cometchat-react-calls/references/share-invite.md +176 -0
  250. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +198 -0
  251. package/skills/cometchat-react-calls/references/voip-and-web-push.md +165 -0
  252. package/skills/cometchat-react-patterns/SKILL.md +1 -1
  253. package/skills/cometchat-react-push/SKILL.md +448 -0
  254. package/skills/cometchat-react-router-patterns/SKILL.md +1 -1
  255. package/skills/cometchat-react-testing/SKILL.md +404 -0
  256. package/skills/cometchat-theming/SKILL.md +3 -3
  257. package/skills/cometchat-troubleshooting/SKILL.md +2 -2
@@ -0,0 +1,413 @@
1
+ ---
2
+ name: cometchat-android-v5-calls
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
+ license: "MIT"
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
+ metadata:
8
+ author: "CometChat"
9
+ version: "4.0.0"
10
+ tags: "cometchat android v5 calls voice video webrtc kotlin java cloudsmith callappsettings session-settings call-logs recording screen-sharing pip foreground-service voip fcm connectionservice"
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Production-grade voice + video calling for native Android v5. Loaded by the `cometchat-calls` dispatcher when the project is Android v5 (detected from `chat-sdk-android:4.x` / `chatuikit-android:5.x` or asked when greenfield). Operates in two modes:
16
+
17
+ - **Standalone** — calls is the product. No `chatuikit-android` UI Kit; just `chat-sdk-android` (for signaling) + `calls-sdk-android` + your own UI surfaces (CallButton on profile, CallLogsActivity, OngoingCallActivity).
18
+ - **Additive** — calls layered onto an existing v5 chat integration. The kit's `CometChatMessageHeader` already exposes call buttons; this skill wires them to the Calls SDK and mounts the global `IncomingCall` listener at app root.
19
+
20
+ **Read these other skills first:**
21
+ - `cometchat-calls` — the dispatcher (mode selection, hard rules, anti-patterns)
22
+ - `cometchat-android-v5-core` — Chat SDK init, login order, `local.properties` + `BuildConfig` credential conventions, Application class wiring
23
+
24
+ **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`)
28
+ - Public docs — https://www.cometchat.com/docs/calls/android/overview
29
+
30
+ ---
31
+
32
+ ## How to use this skill
33
+
34
+ This SKILL.md is the **index + hard rules + Android-specific gotchas**. Deep topic content lives in `references/`. Always read this file end-to-end first; load references on demand.
35
+
36
+ | Topic | Reference file | When to load |
37
+ |---|---|---|
38
+ | SDK setup (Cloudsmith, init, permissions, Jetifier) | `references/setup.md` | Step 1 of every integration |
39
+ | Joining a session (`SessionSettingsBuilder`, voice vs video) | `references/join-session.md` | Step 2 — every integration |
40
+ | Dual-SDK ringing (Chat SDK + Calls SDK together) | `references/ringing-integration.md` | Standalone or additive — every integration with peer-to-peer call flow |
41
+ | All `SessionSettingsBuilder` options (layouts, mode, hide buttons) | `references/session-settings.md` | When customizing in-call UI behavior |
42
+ | Event listeners (status, participant, media, button-click, layout) | `references/event-listeners.md` | When wiring call lifecycle to app state |
43
+ | Call history list | `references/call-logs.md` | When adding `/calls` route or in-app history |
44
+ | Recording (auto-start, recording events) | `references/recording.md` | Feature add |
45
+ | Screen sharing (viewer + presenter status) | `references/screen-sharing.md` | Feature add |
46
+ | Picture-in-picture | `references/picture-in-picture.md` | Feature add |
47
+ | **Foreground service for ongoing calls** | `references/background-handling.md` | **Required** — every standalone integration on Android 14+ |
48
+ | **VoIP push (ConnectionService + FCM high-priority + PhoneAccount)** | `references/voip-calling.md` | **Required** — every standalone integration; optional but strongly recommended in additive |
49
+ | Audio controls (mute/unmute, device switching) | `references/audio-controls.md` | Default UI customization |
50
+ | Video controls (camera on/off, switch camera) | `references/video-controls.md` | Default UI customization |
51
+ | Participant management (mute/kick/raise hand) | `references/participant-management.md` | Group calls / moderator features |
52
+ | Custom UI (control panel, participant list, layout) | `references/custom-ui.md` | When the default UI doesn't fit |
53
+ | In-call chat (messaging during active session) | `references/in-call-chat.md` | Feature add |
54
+
55
+ `references/README.md` is a skim-friendly index of the same.
56
+
57
+ ---
58
+
59
+ ## 1. The seven hard rules
60
+
61
+ These are the production-grade non-negotiables from the `cometchat-calls` dispatcher, specialized for Android v5. Every integration this skill writes must satisfy all seven.
62
+
63
+ ### 1.0 Calls SDK login is its own step (v5+)
64
+
65
+ The v5 Calls SDK has its own auth state, separate from the Chat SDK. After `CometChat.login(uid, AUTH_KEY)` succeeds, you MUST also call `CometChatCalls.login(uid, AUTH_KEY, ...)` — without it, the FIRST calls API call (`initiateCall`, `joinSession`, `generateToken`) throws **"auth token cannot be null"**.
66
+
67
+ ```kotlin
68
+ import com.cometchat.calls.core.CometChatCalls
69
+ import com.cometchat.calls.exceptions.CometChatException as CallsException
70
+ import com.cometchat.calls.model.CallUser // ← callback type, NOT chat User
71
+
72
+ // ✓ RIGHT — chat login first, then calls login
73
+ CometChat.login(uid, AUTH_KEY, object : CometChat.CallbackListener<User>() {
74
+ override fun onSuccess(user: User) {
75
+ CometChatCalls.login(uid, AUTH_KEY,
76
+ object : CometChatCalls.CallbackListener<CallUser>() {
77
+ override fun onSuccess(callUser: CallUser) { /* both ready */ }
78
+ override fun onError(e: CallsException) { /* surface */ }
79
+ })
80
+ }
81
+ override fun onError(e: CometChatException) { /* surface */ }
82
+ })
83
+ ```
84
+
85
+ **Surprises:**
86
+ - The chat-side `User` object does **NOT** expose `authToken` as a Kotlin property or Java getter on Android. Don't try `user.authToken` — use the `(uid, apiKey)` overload for dev, or fetch the auth token from your backend for production.
87
+ - The Calls SDK callback returns `com.cometchat.calls.model.CallUser`, NOT `com.cometchat.chat.models.User`. Importing the wrong type produces "Type mismatch" at compile time.
88
+ - The Calls SDK does NOT persist login across launches the way the Chat SDK does. Even if `CometChat.getLoggedInUser()` returns a non-null user on cold start, you still need to call `CometChatCalls.login` again before any calls API works.
89
+
90
+ This trapped a real smoke run. The chat skill's `loginAfter` pattern doesn't transfer to calls; this is calls-specific.
91
+
92
+ ### 1.1 Dual-SDK contract — `Call` lives in two places
93
+
94
+ 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
+
96
+ - **`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.
98
+
99
+ ```kotlin
100
+ // ✓ RIGHT — initiate ringing
101
+ import com.cometchat.chat.core.Call
102
+ import com.cometchat.chat.core.CometChat
103
+
104
+ val outgoing = Call(receiverUid, CometChatConstants.RECEIVER_TYPE_USER, CometChatConstants.CALL_TYPE_VIDEO)
105
+ CometChat.initiateCall(outgoing, object : CometChat.CallbackListener<Call>() {
106
+ override fun onSuccess(initiated: Call) {
107
+ // initiated.sessionId is what the Calls SDK will join
108
+ }
109
+ override fun onError(e: CometChatException) { /* surface to UI */ }
110
+ })
111
+ ```
112
+
113
+ ```kotlin
114
+ // ✓ RIGHT — join the WebRTC session after the receiver accepts
115
+ import com.cometchat.calls.core.CometChatCalls
116
+ import com.cometchat.calls.core.CallSession
117
+ import com.cometchat.calls.types.SessionType
118
+
119
+ // SessionSettingsBuilder is a NESTED class on CometChatCalls — access it via
120
+ // CometChatCalls.SessionSettingsBuilder, NOT a top-level import.
121
+ // `import com.cometchat.calls.core.SessionSettingsBuilder` fails: no such class.
122
+ val settings = CometChatCalls.SessionSettingsBuilder()
123
+ .setSessionType(SessionType.VIDEO)
124
+ .setIsAudioOnly(false)
125
+ .build()
126
+
127
+ // 4-arg signature: sessionId (or token), settings, RelativeLayout container, callback.
128
+ CometChatCalls.joinSession(sessionId, settings, callContainer,
129
+ object : CometChatCalls.CallbackListener<CallSession>() {
130
+ override fun onSuccess(callSession: CallSession) {
131
+ // Hold onto callSession — in-call APIs (mute, video, layout, leave) live on it.
132
+ }
133
+ override fun onError(e: CometChatException) { /* surface */ }
134
+ })
135
+ ```
136
+
137
+ ```kotlin
138
+ // ✗ WRONG — wrong Call class
139
+ import com.cometchat.chat.models.Call // message-model Call, not the core Call
140
+ val c = Call(...) // compile-time errors on shape; or worse, runtime ambiguity
141
+ ```
142
+
143
+ ### 1.2 VoIP push is wired, not documented
144
+
145
+ Standalone-mode integration **must** ship working VoIP push: ConnectionService + FCM high-priority data messages + a registered `PhoneAccount`. Without it, missed calls don't ring → the integration isn't a product.
146
+
147
+ The full implementation is in `references/voip-calling.md` (~526 lines, the deepest doc in this skill). This skill's standalone-mode scaffold (Section 4) writes:
148
+
149
+ - A `MyConnectionService` extending `android.telecom.ConnectionService`
150
+ - A `PhoneAccountHandle` registered in `Application.onCreate()`
151
+ - A high-priority FCM `FirebaseMessagingService` that listens for incoming-call data messages
152
+ - `MANAGE_OWN_CALLS` + `BIND_TELECOM_CONNECTION_SERVICE` permissions in `AndroidManifest.xml`
153
+ - A `placeIncomingCall` flow that hands off to ConnectionService so the OS rings (lock-screen UI, hardware buttons)
154
+
155
+ In additive mode, this is opt-in but strongly recommended — without it, the app must be foregrounded for incoming calls to ring, which contradicts user expectations.
156
+
157
+ ### 1.3 Foreground service type — the silent crash
158
+
159
+ Android 14+ silently terminates ongoing-call foreground services that don't declare a correct `foregroundServiceType`. The Calls SDK ships `CometChatOngoingCallService`, but the integration must register it correctly:
160
+
161
+ ```xml
162
+ <!-- AndroidManifest.xml -->
163
+ <service
164
+ android:name="com.cometchat.calls.service.CometChatOngoingCallService"
165
+ android:foregroundServiceType="phoneCall|microphone|camera"
166
+ android:exported="false" />
167
+ ```
168
+
169
+ **Common failure mode:** copying older sample-app manifests that omit `phoneCall` (the type that allows the OS to keep the service alive in low-memory). On Android 14+, the call dies with `ForegroundServiceStartNotAllowedException` — visible in `adb logcat`, invisible in-app.
170
+
171
+ Full background-handling guide in `references/background-handling.md`.
172
+
173
+ ### 1.4 Server-minted auth tokens for calls in production
174
+
175
+ The Calls SDK consumes the same auth token the Chat SDK uses. In dev, an Auth Key is fine. In production:
176
+
177
+ - Mint a per-user token via the CometChat REST API on your server
178
+ - Hand it to the client; client calls `CometChat.login(authToken, callback)` (Chat SDK) — Calls SDK reads the same auth context
179
+ - **Never embed Auth Key in `local.properties` for production builds.** The skill's setup writes it for dev and the production-mode flow (handled by `cometchat-android-v5-production`) replaces it with the token-endpoint pattern.
180
+
181
+ This rule mirrors the chat dispatcher's auth rule — `cometchat-android-v5-core` already enforces it.
182
+
183
+ ### 1.5 Hangup cleanup — the camera light
184
+
185
+ The most common "looks fine in dev, fails review" bug: camera light stays on after hangup, or microphone keeps recording until the activity is destroyed.
186
+
187
+ Required teardown when ending a call:
188
+
189
+ ```kotlin
190
+ override fun onCallEnded(call: CallSession) {
191
+ CallSession.getInstance().leaveSession() // 1. End the Calls SDK session (endSession() doesn't exist on Android)
192
+ callContainer?.removeAllViews() // 2. Detach the WebRTC view
193
+ audioManager?.mode = AudioManager.MODE_NORMAL // 3. Release audio routing
194
+ audioManager?.abandonAudioFocusRequest(focusReq) // 4. Abandon audio focus
195
+ stopService(Intent(this, MyOngoingCallService::class.java)) // 5. Stop foreground service
196
+ finish() // 6. Pop the call activity
197
+ }
198
+ ```
199
+
200
+ Skipping any of these strands a system resource. The verification step (Section 9) checks that all six are present in the call-end path.
201
+
202
+ ### 1.6 Permissions with rationale
203
+
204
+ Standalone-mode integration prompts for **four** permissions, each with a rationale string:
205
+
206
+ ```xml
207
+ <!-- AndroidManifest.xml -->
208
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
209
+ <uses-permission android:name="android.permission.CAMERA" />
210
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <!-- Android 13+ -->
211
+ <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" /> <!-- VoIP -->
212
+ <uses-permission android:name="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
213
+ tools:ignore="ProtectedPermissions" /> <!-- VoIP -->
214
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
215
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" /> <!-- Android 14+ -->
216
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" /> <!-- Android 14+ -->
217
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" /> <!-- Android 14+ -->
218
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
219
+ <uses-permission android:name="android.permission.INTERNET" />
220
+ ```
221
+
222
+ The runtime request (`ActivityResultContracts.RequestMultiplePermissions`) must include a denial-rationale dialog — Android lints this.
223
+
224
+ ### 1.7 `IncomingCall` mounted at app root in standalone mode
225
+
226
+ In standalone mode, the `CometChat.addCallListener(...)` registration must happen in the `Application.onCreate()` (not in the foreground activity), so calls ring even when the app is backgrounded or the foreground activity has been destroyed. The listener routes to the ConnectionService (rule 1.2) which presents the OS-level incoming-call UI.
227
+
228
+ In additive mode (alongside chat), the listener can live in a `CallsLifecycleObserver` registered with the application's `LifecycleOwner` — the chat integration's `CometChatActivity` may be destroyed across configuration changes, but the observer survives.
229
+
230
+ ---
231
+
232
+ ## 2. Setup (always)
233
+
234
+ Detailed walkthrough in `references/setup.md`. Summary:
235
+
236
+ ```kotlin
237
+ // settings.gradle.kts
238
+ dependencyResolutionManagement {
239
+ repositories {
240
+ google()
241
+ mavenCentral()
242
+ maven { url = uri("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/") }
243
+ }
244
+ }
245
+
246
+ // app/build.gradle.kts
247
+ dependencies {
248
+ implementation("com.cometchat:chat-sdk-android:4.0.+") // signaling
249
+ implementation("com.cometchat:calls-sdk-android:5.0.+") // WebRTC session
250
+ // additive mode also has chatuikit-android already on the classpath; do not re-add
251
+ }
252
+
253
+ // gradle.properties
254
+ android.useAndroidX=true
255
+ android.enableJetifier=true
256
+ ```
257
+
258
+ Init in `Application.onCreate()`:
259
+
260
+ ```kotlin
261
+ class App : Application() {
262
+ override fun onCreate() {
263
+ super.onCreate()
264
+
265
+ // 1. Chat SDK init (signaling — required for ringing)
266
+ val appSettings = AppSettings.AppSettingsBuilder()
267
+ .subscribePresenceForAllUsers()
268
+ .setRegion(BuildConfig.COMETCHAT_REGION)
269
+ .build()
270
+ CometChat.init(this, BuildConfig.COMETCHAT_APP_ID, appSettings, /* callback */)
271
+
272
+ // 2. Calls SDK init — must come after Chat SDK init
273
+ val callAppSettings = CallAppSettingsBuilder()
274
+ .setAppId(BuildConfig.COMETCHAT_APP_ID)
275
+ .setRegion(BuildConfig.COMETCHAT_REGION)
276
+ .build()
277
+ CometChatCalls.init(this, callAppSettings, /* callback */)
278
+
279
+ // 3. Standalone mode: register PhoneAccount + global call listener (rules 1.2 + 1.7)
280
+ registerPhoneAccount()
281
+ CometChat.addCallListener(LISTENER_ID, GlobalCallListener)
282
+ }
283
+ }
284
+ ```
285
+
286
+ ---
287
+
288
+ ## 3. Components catalog (Calls SDK only — no UI Kit in standalone)
289
+
290
+ The Calls SDK ships these primitives. Names are stable across v5.x:
291
+
292
+ | Class / type | Purpose | Where it lives |
293
+ |---|---|---|
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` |
296
+ | `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` |
300
+ | `CallLogRequest.CallLogRequestBuilder` | Paginated call history fetcher | `com.cometchat.calls.core` |
301
+ | `CometChatCallsEventsListener` | Lifecycle + media + participant + button-click | `com.cometchat.calls.listeners` |
302
+
303
+ In additive mode, `chatuikit-android`'s `CometChatMessageHeader` already exposes call buttons — see `cometchat-android-v5-components` for the kit-side view.
304
+
305
+ Component-level deep dives: `references/audio-controls.md`, `references/video-controls.md`, `references/participant-management.md`, `references/custom-ui.md`.
306
+
307
+ ---
308
+
309
+ ## 4. Standalone integration (calls is the product)
310
+
311
+ When `product === "voice-video"` and there is no existing chat integration.
312
+
313
+ **Split by calling mode:**
314
+
315
+ ### 4a. Standalone — Session mode (meeting-room UX, no ringing)
316
+
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:
318
+
319
+ 1. **`Application` class** — `CometChatCalls.init(...)` ONLY in `onCreate`. No `CometChat.init`, no PhoneAccount, no ConnectionService.
320
+ 2. **`JoinSessionActivity`** — UID picker + Start/Join meeting + state.
321
+ 3. **`CallActivity`** — Single-call `CometChatCalls.joinSession(sessionId, sessionSettings, container, CallbackListener)`. `SessionStatusListener` + `ButtonClickListener` registered on the `CallSession` from `onSuccess`. `CometChatOngoingCallService.launch/abort`. See `references/call-session.md`.
322
+ 4. **`AndroidManifest.xml`** — Camera + microphone permissions + `FOREGROUND_SERVICE_MICROPHONE/CAMERA` + `CometChatOngoingCallService` registration. NO ConnectionService.
323
+ 5. **App Links** — `https://yourapp.com/meet/<sessionId>` deep-link routing.
324
+
325
+ **Why no ConnectionService / no FCM-VoIP:** session mode never receives an incoming-call FCM payload. No ringing.
326
+
327
+ ### 4b. Standalone — Ringing mode (Chat SDK signaling + ConnectionService + FCM-VoIP)
328
+
329
+ Dual-SDK + telecom + push. Scaffold:
330
+
331
+ 1. **`Application` class** — Chat SDK + Calls SDK init in onCreate, PhoneAccount registration, global call listener (rules 1.7, 1.2).
332
+ 2. **`CallButtonView` Kotlin component** — voice + video buttons rendered next to a user profile / contact card. Calls `CometChat.initiateCall(...)` on tap, navigates to `OutgoingCallActivity`.
333
+ 3. **`OutgoingCallActivity`** — shows the dialing UI; transitions to `OngoingCallActivity` when the receiver accepts (`OutgoingCallStatusListener`).
334
+ 4. **`OngoingCallActivity`** — hosts the WebRTC view via `CometChatCalls.joinSession(sessionId, settings, container, callback)`, handles all in-call controls (mute/camera/end), implements rule 1.5 teardown.
335
+ 5. **`CallLogsActivity`** — `/calls` equivalent — paginated history via `CallLogRequest.CallLogRequestBuilder`. Tap a row → re-call.
336
+ 6. **`MyConnectionService` + `MyFirebaseMessagingService`** — VoIP push end-to-end (rule 1.2). Wired in manifest with the right `foregroundServiceType` (rule 1.3).
337
+ 7. **Permission rationale dialog** — `ActivityResultContracts.RequestMultiplePermissions` with denial-rationale strings (rule 1.6).
338
+
339
+ Detailed walkthrough: `references/ringing-integration.md` (dual-SDK setup), `references/voip-calling.md` (push end-to-end), `references/background-handling.md` (foreground service).
340
+
341
+ ---
342
+
343
+ ## 5. Additive integration (calls on top of existing chat)
344
+
345
+ When the project already has `chatuikit-android` integrated. The skill:
346
+
347
+ 1. **Patches `Application.onCreate()`** — adds `CometChatCalls.init(...)` after the existing `CometChat.init(...)` block. Adds the global call listener.
348
+ 2. **Patches `AndroidManifest.xml`** — adds the four FOREGROUND_SERVICE permissions (rule 1.6) and the `CometChatOngoingCallService` registration with the correct type (rule 1.3).
349
+ 3. **Wires `CometChatMessageHeader` call buttons** — the kit's header already shows voice + video icons; the skill registers the listeners so they call `CometChat.initiateCall` (rule 1.1).
350
+ 4. **Adds an `IncomingCallListener`** scoped to the application LifecycleOwner (rule 1.7) — survives chat-activity recreation.
351
+ 5. **VoIP push: opt-in.** The skill asks the user before scaffolding ConnectionService — it's a substantial code addition, and additive-mode users may prefer to add it later.
352
+ 6. **Adds a `CallLogsFragment`** that can be hosted alongside `CometChatConversationsFragment` in the existing tab/activity structure.
353
+
354
+ Important: do NOT re-add `chat-sdk-android` or `chatuikit-android` to `build.gradle.kts` — they're already there. Only add `calls-sdk-android`.
355
+
356
+ ---
357
+
358
+ ## 6. Anti-patterns
359
+
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.
361
+
362
+ 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
+
364
+ 3. **Registering the call listener in the foreground activity.** Survives only as long as the activity does — meaning the app must be open for calls to ring. Rule 1.7 requires Application or a process-scoped LifecycleOwner.
365
+
366
+ 4. **Skipping `android.enableJetifier=true`.** Without it, `androidx.legacy.support` artifacts inside the SDK throw `Duplicate class android.support.v4.*` at build. Rule lives in setup.
367
+
368
+ 5. **Omitting `foregroundServiceType="phoneCall"`.** Silent crash on Android 14+ (rule 1.3). Common when copying older sample-app manifests.
369
+
370
+ 6. **Re-initializing the Calls SDK after every login.** `CometChatCalls.init()` is process-scoped — call it once in Application.onCreate(). Re-init does not "refresh" the auth context; logout-handling lives in rule 1.4's token replay.
371
+
372
+ 7. **Using `addCallListener` without a stable listener ID.** Two listeners with the same ID overwrite. Two listeners with different IDs both fire — easy duplicate-IncomingCall UI bug. Use a documented constant (`const val LISTENER_ID = "global-call-listener"`).
373
+
374
+ ---
375
+
376
+ ## 7. Verification checklist
377
+
378
+ After scaffolding, verify (the skill writes Espresso-style smoke tests where possible; otherwise prompts the user to confirm):
379
+
380
+ **Static (the agent checks before claiming done):**
381
+
382
+ - [ ] `calls-sdk-android` in `app/build.gradle.kts` dependencies
383
+ - [ ] Cloudsmith maven URL in `settings.gradle.kts`
384
+ - [ ] `android.useAndroidX=true` and `android.enableJetifier=true` in `gradle.properties`
385
+ - [ ] `CometChat.init` followed by `CometChatCalls.init` in `Application.onCreate`
386
+ - [ ] All four `RECORD_AUDIO` / `CAMERA` / `POST_NOTIFICATIONS` / `MANAGE_OWN_CALLS` permissions in `AndroidManifest.xml`
387
+ - [ ] All three `FOREGROUND_SERVICE_*` Android 14+ permissions in `AndroidManifest.xml`
388
+ - [ ] `CometChatOngoingCallService` with `foregroundServiceType="phoneCall|microphone|camera"`
389
+ - [ ] Call listener registration uses a stable string ID
390
+ - [ ] Hangup path includes `endSession()` + `removeAllViews()` + audio-focus abandon + service stop + finish (rule 1.5)
391
+ - [ ] **Standalone only:** `ConnectionService` subclass + `PhoneAccount` registration + FCM `MessagingService` for incoming-call data messages
392
+ - [ ] **Standalone only:** Call listener registered in `Application.onCreate`, not an activity
393
+
394
+ **Runtime (real device — the skill prompts the user):**
395
+
396
+ - [ ] Outgoing voice call connects and audio is two-way
397
+ - [ ] Outgoing video call connects and video is two-way
398
+ - [ ] Incoming call rings on lock screen with the device backgrounded (standalone) or with chat-activity destroyed (additive)
399
+ - [ ] Hangup releases the camera light and microphone within 2 seconds
400
+ - [ ] Call log entry appears after the call ends
401
+ - [ ] Permission rationale dialog appears the second time a permission is requested after denial
402
+ - [ ] On Android 14+ device: ongoing-call notification shows, swipe-up doesn't kill the call
403
+
404
+ ---
405
+
406
+ ## 8. Pointers to other skills
407
+
408
+ - `cometchat-calls` — the dispatcher that loads this skill
409
+ - `cometchat-android-v5-core` — Chat SDK init, login, env conventions
410
+ - `cometchat-android-v5-components` — `CometChatMessageHeader` call buttons (additive mode)
411
+ - `cometchat-android-v5-push` — FCM setup, notification handling (overlap with VoIP push but distinct)
412
+ - `cometchat-android-v5-production` — server-minted auth tokens, ProGuard rules for the Calls SDK
413
+ - `cometchat-android-v5-troubleshooting` — symptom-to-cause for the common failure modes (Jetifier, foregroundServiceType, MANAGE_OWN_CALLS not granted)
@@ -0,0 +1,53 @@
1
+ # CometChat Calls SDK v5 — Android Skills
2
+
3
+ Agent skills for building with the CometChat Calls SDK v5 on Android. Install individually or browse all available skills.
4
+
5
+ ## How It Works
6
+
7
+ Skills are bundled in this repository under `skills/`. When you clone the repo and open it in a supported AI coding assistant, skills auto-trigger based on what you're doing — mention "join session" and the join-session skill loads, ask about "VoIP calling" and the voip-calling skill loads. No manual activation needed.
8
+
9
+ To use these skills in your own project, copy the `skills/` folder into your project root:
10
+
11
+ ```bash
12
+ cp -r skills/ /path/to/your/project/skills/
13
+ ```
14
+
15
+ ## Available Skills
16
+
17
+ ### Core
18
+
19
+ | Skill | Triggers On |
20
+ |-------|-------------|
21
+ | `setup` | SDK dependencies, Cloudsmith maven, CallAppSettings, init, permissions, Jetifier |
22
+ | `join-session` | CometChatCalls.joinSession, SessionSettingsBuilder, voice vs video |
23
+ | `ringing-integration` | Dual SDK (Chat + Calls), initiateCall, accept/reject/cancel, incoming/outgoing |
24
+ | `session-settings` | All SessionSettingsBuilder options: layouts, session type, audio mode, hide buttons |
25
+ | `event-listeners` | SessionStatus, Participant, Media, ButtonClick, Layout listeners |
26
+ | `call-logs` | CallLogRequest, fetching and displaying call history |
27
+
28
+ ### Advanced
29
+
30
+ | Skill | Triggers On |
31
+ |-------|-------------|
32
+ | `recording` | Auto-start recording, recording events |
33
+ | `screen-sharing` | Screen share setup, MediaProjection permissions |
34
+ | `picture-in-picture` | PiP mode configuration |
35
+ | `background-handling` | CometChatOngoingCallService, foreground service |
36
+ | `voip-calling` | VoIP push notifications, ConnectionService |
37
+ | `audio-controls` | Mute/unmute, audio device switching |
38
+ | `video-controls` | Camera on/off, switch camera |
39
+ | `participant-management` | Participant list, mute/kick, raise hand |
40
+ | `custom-ui` | Custom control panel, participant list, layout customization |
41
+ | `in-call-chat` | In-call messaging during active session |
42
+
43
+ ## How Auto-Detection Works
44
+
45
+ Each skill has a `description` field in its YAML frontmatter that lists trigger keywords. When you mention something related (like "join a call" or "add VoIP support"), the agent reads the description, decides the skill is relevant, and loads its full content. You never need to manually select a skill.
46
+
47
+ ## Compatibility
48
+
49
+ - CometChat Calls SDK v5 (5.0.0-beta.2+)
50
+ - CometChat Chat SDK v4 (4.0.+) — required for ringing and VoIP
51
+ - Kotlin, Java 17
52
+ - Gradle KTS, compileSdk 35, minSdk 26
53
+ - Works with: Kiro, Claude Code, Cursor, Copilot, and other AI coding assistants that support the skills ecosystem
@@ -0,0 +1,195 @@
1
+ # Adding calls to an existing chat integration (Android V5)
2
+
3
+ You have `chatuikit-android` (V5 cohort) working. Adding calls = `calls-sdk-android` + ConnectionService + foreground service permissions.
4
+
5
+ **Read first:** `cometchat-android-v5-calls/SKILL.md` — seven hard rules (init order, ConnectionService, foreground service type, hangup teardown).
6
+
7
+ ---
8
+
9
+ ## Step 1 — Install Calls SDK from Cloudsmith
10
+
11
+ ```kotlin
12
+ // settings.gradle.kts (or settings.gradle)
13
+ dependencyResolutionManagement {
14
+ repositories {
15
+ maven { url = uri("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/") }
16
+ google()
17
+ mavenCentral()
18
+ }
19
+ }
20
+
21
+ // app/build.gradle.kts
22
+ dependencies {
23
+ implementation("com.cometchat:calls-sdk-android:5.+")
24
+ // existing chat-uikit dependency stays
25
+ }
26
+ ```
27
+
28
+ ```bash
29
+ ./gradlew :app:dependencies | grep calls-sdk-android
30
+ ```
31
+
32
+ Should resolve to `5.x.x`.
33
+
34
+ ---
35
+
36
+ ## Step 2 — Permissions + manifest
37
+
38
+ ```xml
39
+ <!-- AndroidManifest.xml -->
40
+ <uses-permission android:name="android.permission.RECORD_AUDIO"/>
41
+ <uses-permission android:name="android.permission.CAMERA"/>
42
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
43
+ <uses-permission android:name="android.permission.BLUETOOTH"/>
44
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
45
+ <uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
46
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
47
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>
48
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA"/>
49
+
50
+ <application ...>
51
+ <service
52
+ android:name=".AppConnectionService"
53
+ android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
54
+ android:foregroundServiceType="microphone|camera"
55
+ android:exported="true">
56
+ <intent-filter>
57
+ <action android:name="android.telecom.ConnectionService"/>
58
+ </intent-filter>
59
+ </service>
60
+ </application>
61
+ ```
62
+
63
+ `foregroundServiceType="microphone|camera"` is mandatory on Android 14+.
64
+
65
+ ---
66
+
67
+ ## Step 3 — Init order: chat → calls
68
+
69
+ In your existing `Application.onCreate` or your init activity:
70
+
71
+ ```kotlin
72
+ import com.cometchat.calls.core.CometChatCalls
73
+ import com.cometchat.calls.core.CallAppSettings
74
+
75
+ // Existing chat init
76
+ CometChatUIKit.init(this, uikitSettings, object : CometChat.CallbackListener<String>() {
77
+ override fun onSuccess(s: String) {
78
+ // NEW: Calls init AFTER chat init
79
+ val callsSettings = CallAppSettings(appId = APP_ID, region = REGION)
80
+ CometChatCalls.init(callsSettings, object : CometChatCalls.CallbackListener<String>() {
81
+ override fun onSuccess(s: String) { /* both initialized */ }
82
+ override fun onError(e: CometChatException) { Log.e("App", "Calls init failed", e) }
83
+ })
84
+ }
85
+
86
+ override fun onError(e: CometChatException) {}
87
+ })
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Step 4 — Login both SDKs
93
+
94
+ After your existing login flow:
95
+
96
+ ```kotlin
97
+ CometChat.login(uid, authKey, object : CometChat.CallbackListener<User>() {
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) {}
103
+ })
104
+ }
105
+ override fun onError(e: CometChatException) {}
106
+ })
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Step 5 — IncomingCall via ConnectionService
112
+
113
+ Implement `AppConnectionService` (see `cometchat-android-v5-calls/SKILL.md` rule 4). The ConnectionService receives FCM data-message → calls `addNewIncomingCall` → OS shows incoming-call UI.
114
+
115
+ Plus an `IncomingCallActivity` that handles user action (accept/reject) and routes to your chat UI's call surface:
116
+
117
+ ```kotlin
118
+ class IncomingCallActivity : AppCompatActivity() {
119
+ override fun onCreate(savedInstanceState: Bundle?) {
120
+ super.onCreate(savedInstanceState)
121
+ // Show over lock screen
122
+ setShowWhenLocked(true)
123
+ setTurnScreenOn(true)
124
+ // ... bind your incoming-call layout
125
+ }
126
+ }
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Step 6 — FCM token registration
132
+
133
+ Add a `FirebaseMessagingService` subclass and POST tokens to your server (see `cometchat-android-v5-calls/references/server-fcm-voip.md`):
134
+
135
+ ```kotlin
136
+ class VoipMessagingService : FirebaseMessagingService() {
137
+ override fun onNewToken(token: String) {
138
+ // POST to your server, keyed to current user UID
139
+ api.registerCallToken(currentUid, "android-fcm", token)
140
+ }
141
+
142
+ override fun onMessageReceived(message: RemoteMessage) {
143
+ if (message.data["type"] != "incoming_call") return
144
+ // Hand off to ConnectionService — see V5 server-fcm-voip reference
145
+ }
146
+ }
147
+ ```
148
+
149
+ Register in manifest:
150
+ ```xml
151
+ <service
152
+ android:name=".VoipMessagingService"
153
+ android:exported="false">
154
+ <intent-filter>
155
+ <action android:name="com.google.firebase.MESSAGING_EVENT" />
156
+ </intent-filter>
157
+ </service>
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Step 7 — Hangup teardown
163
+
164
+ ```kotlin
165
+ fun endCall(sessionId: String) {
166
+ CometChatCalls.leaveSession()
167
+ CometChat.endCall(sessionId, object : CometChat.CallbackListener<Call>() { /* ... */ })
168
+ // ConnectionService disconnect
169
+ activeConnection?.setDisconnected(DisconnectCause(DisconnectCause.LOCAL))
170
+ activeConnection?.destroy()
171
+ }
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Verification checklist
177
+
178
+ - [ ] Cloudsmith Maven repo added
179
+ - [ ] `calls-sdk-android:5.+` in app/build.gradle
180
+ - [ ] Manifest permissions: RECORD_AUDIO, CAMERA, MANAGE_OWN_CALLS, FOREGROUND_SERVICE_MICROPHONE/CAMERA
181
+ - [ ] AppConnectionService declared with `foregroundServiceType` + permission
182
+ - [ ] Calls init runs AFTER chat init's onSuccess
183
+ - [ ] Calls login runs AFTER chat login's onSuccess
184
+ - [ ] FCM token registered + POSTed to server
185
+ - [ ] Hangup tears down all 3: leaveSession, endCall, ConnectionService disconnect
186
+ - [ ] Real-device smoke: app killed → caller dials → recipient phone rings on lock screen
187
+ - [ ] Run `cometchat verify --calls` — should pass
188
+
189
+ ---
190
+
191
+ ## Pointers
192
+
193
+ - `cometchat-react-calls/references/add-calls-to-existing-chat.md` — canonical
194
+ - `cometchat-android-v5-calls/SKILL.md` — seven hard rules
195
+ - `cometchat-android-v5-calls/references/server-fcm-voip.md` — server-side FCM