@cometchat/skills 4.3.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -25,7 +25,9 @@ Should show `com.cometchat:calls-sdk-android:5.x.x`.
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
## Step 2 — Migrate init to
|
|
28
|
+
## Step 2 — Migrate init to the v5 builder + `Context`
|
|
29
|
+
|
|
30
|
+
v5 still uses a builder — but the class is the **nested `CallAppSettings.CallAppSettingBuilder`** (singular "Setting"), and `init` now takes `Context` as its first argument.
|
|
29
31
|
|
|
30
32
|
```diff
|
|
31
33
|
- val callAppSettings = CallAppSettings.Builder()
|
|
@@ -37,13 +39,18 @@ Should show `com.cometchat:calls-sdk-android:5.x.x`.
|
|
|
37
39
|
- override fun onError(e: CometChatException) { /* ... */ }
|
|
38
40
|
- })
|
|
39
41
|
|
|
40
|
-
+ val
|
|
41
|
-
+
|
|
42
|
+
+ val callAppSettings = CallAppSettings.CallAppSettingBuilder() // nested, singular "Setting"
|
|
43
|
+
+ .setAppId("APP_ID")
|
|
44
|
+
+ .setRegion("REGION")
|
|
45
|
+
+ .build()
|
|
46
|
+
+ CometChatCalls.init(context, callAppSettings, object : CometChatCalls.CallbackListener<String>() {
|
|
42
47
|
+ override fun onSuccess(s: String) { /* ... */ }
|
|
43
48
|
+ override fun onError(e: CometChatException) { /* ... */ }
|
|
44
49
|
+ })
|
|
45
50
|
```
|
|
46
51
|
|
|
52
|
+
> Verified against `calls-sdk-android` 5.x: `CometChatCalls.init(Context, CallAppSettings, CallbackListener<String>)` and `CallAppSettings.CallAppSettingBuilder().setAppId(...).setRegion(...).build()`. There is NO `CallAppSettings(appId =, region =)` constructor and NO `CallAppSettings.Builder()`.
|
|
53
|
+
|
|
47
54
|
(V5 also supports coroutine-suspend `init` via `kotlinx.coroutines` extensions, if you've enabled them.)
|
|
48
55
|
|
|
49
56
|
---
|
|
@@ -95,18 +102,27 @@ After this step, `generateToken()` no longer needs the authToken parameter — t
|
|
|
95
102
|
- .showRecordingButton(true)
|
|
96
103
|
- .build()
|
|
97
104
|
|
|
98
|
-
+ val sessionSettings =
|
|
99
|
-
+
|
|
100
|
-
+ startAudioMuted
|
|
101
|
-
+ hideRecordingButton
|
|
102
|
-
+
|
|
103
|
-
+
|
|
105
|
+
+ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
106
|
+
+ .setSessionType(SessionType.VIDEO)
|
|
107
|
+
+ .startAudioMuted(false)
|
|
108
|
+
+ .hideRecordingButton(false) // INVERTED — showRecordingButton(true) → hideRecordingButton(false)
|
|
109
|
+
+ .setLayout(LayoutType.TILE)
|
|
110
|
+
+ .build()
|
|
104
111
|
```
|
|
105
112
|
|
|
113
|
+
> There is NO `SessionSettings(sessionType =, startAudioMuted =, hideRecordingButton =, layout =)` data-class constructor on Android — use `CometChatCalls.SessionSettingsBuilder()` with the chained flag methods (cf. `call-session.md` rule 2).
|
|
114
|
+
|
|
106
115
|
---
|
|
107
116
|
|
|
108
117
|
## Step 5 — Migrate listener interface to event listeners
|
|
109
118
|
|
|
119
|
+
v5 splits the old single events interface into five abstract listeners (`SessionStatusListener`,
|
|
120
|
+
`ParticipantEventListener`, `MediaEventsListener`, `ButtonClickListener`, `LayoutListener`).
|
|
121
|
+
Register them on the `CallSession` instance from `joinSession`'s `onSuccess` callback — there is
|
|
122
|
+
NO `CometChatCalls.addEventListener` and NO `CallEvent` enum on Android (cf. `call-session.md`
|
|
123
|
+
rule 3 and `references/event-listeners.md`). The listeners are lifecycle-aware (pass the
|
|
124
|
+
Activity/Fragment as the first arg) and auto-removed on destroy.
|
|
125
|
+
|
|
110
126
|
```diff
|
|
111
127
|
- class MyCallEvents : CometChatCallsEventsListener {
|
|
112
128
|
- override fun onCallEnded() { /* ... */ }
|
|
@@ -115,24 +131,23 @@ After this step, `generateToken()` no longer needs the authToken parameter — t
|
|
|
115
131
|
- override fun onError(error: CometChatException) { /* ... */ }
|
|
116
132
|
- }
|
|
117
133
|
|
|
118
|
-
+ //
|
|
119
|
-
+
|
|
120
|
-
+
|
|
121
|
-
+
|
|
122
|
-
+
|
|
123
|
-
+
|
|
124
|
-
+
|
|
125
|
-
+
|
|
126
|
-
+
|
|
127
|
-
+
|
|
128
|
-
+ }
|
|
134
|
+
+ // In joinSession's onSuccess(callSession: CallSession):
|
|
135
|
+
+ callSession.addSessionStatusListener(this, object : SessionStatusListener() {
|
|
136
|
+
+ override fun onSessionLeft() { /* ... */ }
|
|
137
|
+
+ })
|
|
138
|
+
+ callSession.addParticipantEventListener(this, object : ParticipantEventListener() {
|
|
139
|
+
+ override fun onParticipantJoined(participant: Participant) { /* ... */ }
|
|
140
|
+
+ override fun onParticipantLeft(participant: Participant) { /* ... */ }
|
|
141
|
+
+ })
|
|
142
|
+
+ // ...plus MediaEventsListener / ButtonClickListener / LayoutListener as needed.
|
|
143
|
+
+ // See references/event-listeners.md for the full override set on each.
|
|
129
144
|
```
|
|
130
145
|
|
|
131
146
|
---
|
|
132
147
|
|
|
133
148
|
## Step 6 — Method renames + receiver shift (Android-specific)
|
|
134
149
|
|
|
135
|
-
v5 moved
|
|
150
|
+
v5 moved call-control APIs from static methods on `CometChatCalls` to **instance methods on `CallSession`** (the object returned by `joinSession`'s callback). Session teardown moved from the v4 static `CometChatCalls.endSession()` to the instance method `callSession.leaveSession()` — this is what both calls-sdk-android sample apps use and what the migration guide maps it to. Keep a reference to the `CallSession` (or use `CallSession.getInstance()`); v4 static receivers throw "method not found" against the v5 SDK.
|
|
136
151
|
|
|
137
152
|
```diff
|
|
138
153
|
// session lifecycle — receiver changes from CometChatCalls (static) to CallSession (instance)
|
|
@@ -152,14 +167,15 @@ v5 moved most call-control APIs from static methods on `CometChatCalls` to **ins
|
|
|
152
167
|
- CometChatCalls.pauseVideo(false)
|
|
153
168
|
+ callSession.resumeVideo()
|
|
154
169
|
|
|
170
|
+
// screen share — Android is RECEIVE-ONLY in v5: there is NO screen-share initiation API.
|
|
171
|
+
// Drop any startScreenShare()/stopScreenShare() calls; observe incoming shares via
|
|
172
|
+
// ParticipantEventListener.onParticipantStartedScreenShare / onParticipantStoppedScreenShare.
|
|
155
173
|
- CometChatCalls.startScreenShare()
|
|
156
|
-
+ callSession.startScreenShare()
|
|
157
174
|
- CometChatCalls.stopScreenShare()
|
|
158
|
-
+ callSession.stopScreenShare()
|
|
159
175
|
|
|
160
|
-
// layout —
|
|
176
|
+
// layout — instance method on the CallSession in v5 (NOT static on CometChatCalls)
|
|
161
177
|
- CometChatCalls.setMode(mode)
|
|
162
|
-
+
|
|
178
|
+
+ callSession.setLayout(layout) // or CallSession.getInstance().setLayout(layout)
|
|
163
179
|
```
|
|
164
180
|
|
|
165
181
|
**Hold onto the `CallSession` reference** returned by `joinSession`'s `onSuccess(callSession: CallSession)` callback — most v5 in-call APIs live there. Stashing it in an Activity field or ViewModel is the canonical pattern; the SDK also exposes `CallSession.getInstance()` as a fallback if you've lost the reference.
|
|
@@ -191,8 +207,8 @@ The seven hard rules from `cometchat-android-v5-calls/SKILL.md` still apply post
|
|
|
191
207
|
- [ ] `app/build.gradle.kts` lists calls-sdk-android v5+
|
|
192
208
|
- [ ] `./gradlew :app:dependencies` shows v5 resolved
|
|
193
209
|
- [ ] `CometChatCalls.login(authToken)` called after `CometChat.login`
|
|
194
|
-
- [ ] `CometChatCallsEventsListener` replaced with `
|
|
195
|
-
- [ ] `CallSettings.Builder` replaced with `
|
|
210
|
+
- [ ] `CometChatCallsEventsListener` replaced with the five split listeners on the `CallSession` instance
|
|
211
|
+
- [ ] `CallSettings.Builder` replaced with `CometChatCalls.SessionSettingsBuilder()`
|
|
196
212
|
- [ ] Method renames applied
|
|
197
213
|
- [ ] FCM VoIP push still arrives + ConnectionService still surfaces UI
|
|
198
214
|
- [ ] Real-device smoke: 2 phones, foreground + backgrounded recipient, mic/camera/screenshare/end
|
|
@@ -32,10 +32,10 @@ callSession.muteParticipant(participant.uid)
|
|
|
32
32
|
callSession.pauseParticipantVideo(participant.uid)
|
|
33
33
|
|
|
34
34
|
// Pin a participant (keeps them prominent in layout)
|
|
35
|
-
callSession.pinParticipant(participant.uid)
|
|
35
|
+
callSession.pinParticipant(participant.uid) // per official docs (calls/android/participant-management)
|
|
36
36
|
|
|
37
37
|
// Unpin (return to automatic speaker highlighting)
|
|
38
|
-
callSession.
|
|
38
|
+
callSession.unpinParticipant()
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### Raise Hand (Self)
|
|
@@ -101,7 +101,7 @@ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
|
101
101
|
- By default, **all participants** have moderator access (can mute/pause others)
|
|
102
102
|
- Implement role-based restrictions in your app logic if needed
|
|
103
103
|
- Pinning only affects **your local view** — other participants can pin independently
|
|
104
|
-
- `
|
|
104
|
+
- `unpinParticipant()` takes no arguments — unpins whoever is currently pinned
|
|
105
105
|
- `raisedHandTimestamp > 0` means hand is raised
|
|
106
106
|
- There is no "kick" API — only mute and pause video
|
|
107
107
|
|
|
@@ -11,15 +11,18 @@ Native CometChat Calls SDK for Android. The shape mirrors web (raise/lower + lis
|
|
|
11
11
|
|
|
12
12
|
```kotlin
|
|
13
13
|
import com.cometchat.calls.core.CometChatCalls
|
|
14
|
-
import com.cometchat.calls.
|
|
14
|
+
import com.cometchat.calls.core.CallSession
|
|
15
|
+
import com.cometchat.calls.listeners.ParticipantEventListener
|
|
15
16
|
import com.cometchat.calls.model.Participant
|
|
17
|
+
import com.cometchat.calls.model.SessionType
|
|
16
18
|
|
|
17
|
-
// Local user
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
// Local user — raiseHand / lowerHand are instance methods on the CallSession singleton.
|
|
20
|
+
CallSession.getInstance().raiseHand()
|
|
21
|
+
CallSession.getInstance().lowerHand()
|
|
20
22
|
|
|
21
|
-
// Listener —
|
|
22
|
-
|
|
23
|
+
// Listener — raise/lower hand are participant events in v5.
|
|
24
|
+
// Register on the CallSession instance from joinSession's onSuccess callback.
|
|
25
|
+
callSession.addParticipantEventListener(this, object : ParticipantEventListener() {
|
|
23
26
|
override fun onParticipantHandRaised(participant: Participant) {
|
|
24
27
|
// participant.uid, participant.name
|
|
25
28
|
}
|
|
@@ -27,11 +30,11 @@ val listener = object : CometChatCallsEventsListener {
|
|
|
27
30
|
override fun onParticipantHandLowered(participant: Participant) {
|
|
28
31
|
// ...
|
|
29
32
|
}
|
|
30
|
-
// ... other event handlers
|
|
31
|
-
}
|
|
33
|
+
// ... other participant event handlers
|
|
34
|
+
})
|
|
32
35
|
|
|
33
36
|
// Settings flag
|
|
34
|
-
val settings = SessionSettingsBuilder(
|
|
37
|
+
val settings = CometChatCalls.SessionSettingsBuilder()
|
|
35
38
|
.setSessionType(SessionType.VIDEO)
|
|
36
39
|
.hideRaiseHandButton(true)
|
|
37
40
|
.build()
|
|
@@ -40,17 +43,17 @@ val settings = SessionSettingsBuilder(context, callContainer)
|
|
|
40
43
|
For **Java**:
|
|
41
44
|
|
|
42
45
|
```java
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
CallSession.getInstance().raiseHand();
|
|
47
|
+
CallSession.getInstance().lowerHand();
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
callSession.addParticipantEventListener(this, new ParticipantEventListener() {
|
|
47
50
|
@Override
|
|
48
51
|
public void onParticipantHandRaised(Participant participant) { /* ... */ }
|
|
49
52
|
|
|
50
53
|
@Override
|
|
51
54
|
public void onParticipantHandLowered(Participant participant) { /* ... */ }
|
|
52
55
|
// ...
|
|
53
|
-
};
|
|
56
|
+
});
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
---
|
|
@@ -63,7 +66,7 @@ For a single-Activity call surface:
|
|
|
63
66
|
class CallActivity : AppCompatActivity() {
|
|
64
67
|
|
|
65
68
|
private lateinit var raiseHandViewModel: RaiseHandViewModel
|
|
66
|
-
private val callListener = object :
|
|
69
|
+
private val callListener = object : ParticipantEventListener() {
|
|
67
70
|
override fun onParticipantHandRaised(p: Participant) {
|
|
68
71
|
raiseHandViewModel.onRaised(p)
|
|
69
72
|
}
|
|
@@ -76,12 +79,15 @@ class CallActivity : AppCompatActivity() {
|
|
|
76
79
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
77
80
|
super.onCreate(savedInstanceState)
|
|
78
81
|
raiseHandViewModel = ViewModelProvider(this)[RaiseHandViewModel::class.java]
|
|
79
|
-
//
|
|
82
|
+
// Register on the CallSession instance (from joinSession's onSuccess) when
|
|
83
|
+
// the session starts: callSession.addParticipantEventListener(this, callListener)
|
|
84
|
+
// (rule 1.7 in cometchat-android-v5-calls). Listeners are lifecycle-aware.
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
override fun onDestroy() {
|
|
83
88
|
super.onDestroy()
|
|
84
|
-
//
|
|
89
|
+
// Listeners are lifecycle-aware (bound to the Activity passed as the first
|
|
90
|
+
// arg) and auto-removed on destroy; otherwise leaveSession() tears them down.
|
|
85
91
|
}
|
|
86
92
|
}
|
|
87
93
|
```
|
|
@@ -106,9 +112,9 @@ class RaiseHandViewModel : ViewModel() {
|
|
|
106
112
|
|
|
107
113
|
fun toggle() {
|
|
108
114
|
if (_state.value.localRaised) {
|
|
109
|
-
|
|
115
|
+
CallSession.getInstance().lowerHand()
|
|
110
116
|
} else {
|
|
111
|
-
|
|
117
|
+
CallSession.getInstance().raiseHand()
|
|
112
118
|
}
|
|
113
119
|
_state.update { it.copy(localRaised = !it.localRaised) }
|
|
114
120
|
}
|
|
@@ -221,7 +227,7 @@ Web sister reference rules apply, plus Android-specific:
|
|
|
221
227
|
## Verification checklist
|
|
222
228
|
|
|
223
229
|
- [ ] `RaiseHandViewModel` uses `StateFlow` (not LiveData) for the call state
|
|
224
|
-
- [ ]
|
|
230
|
+
- [ ] `ParticipantEventListener` attached on the `CallSession` at session start (lifecycle-aware; also torn down by `leaveSession()`)
|
|
225
231
|
- [ ] `repeatOnLifecycle(Lifecycle.State.STARTED)` wraps every collect
|
|
226
232
|
- [ ] Toggle button has `contentDescription` + `isSelected` set
|
|
227
233
|
- [ ] `announceForAccessibility` on state change
|
|
@@ -51,11 +51,11 @@ callSession.addMediaEventsListener(this, object : MediaEventsListener() {
|
|
|
51
51
|
override fun onAudioUnMuted() {}
|
|
52
52
|
override fun onVideoPaused() {}
|
|
53
53
|
override fun onVideoResumed() {}
|
|
54
|
-
override fun onScreenShareStarted() {}
|
|
55
|
-
override fun onScreenShareStopped() {}
|
|
56
54
|
override fun onAudioModeChanged(audioMode: AudioMode) {}
|
|
57
55
|
override fun onCameraFacingChanged(facing: CameraFacing) {}
|
|
58
56
|
})
|
|
57
|
+
// Screen-share is observed via ParticipantEventListener.onParticipantStartedScreenShare /
|
|
58
|
+
// onParticipantStoppedScreenShare — NOT MediaEventsListener.
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Track Participant Recording
|
|
@@ -15,7 +15,7 @@ Implement call ringing using both CometChat Chat SDK (signaling) and Calls SDK (
|
|
|
15
15
|
- Both SDKs added to `build.gradle.kts`:
|
|
16
16
|
```kotlin
|
|
17
17
|
implementation("com.cometchat:chat-sdk-android:4.0.+")
|
|
18
|
-
implementation("com.cometchat:calls-sdk-android:5.0
|
|
18
|
+
implementation("com.cometchat:calls-sdk-android:5.0.+")
|
|
19
19
|
```
|
|
20
20
|
- Both SDKs initialized and user logged in to both
|
|
21
21
|
|
|
@@ -61,21 +61,17 @@ override fun onParticipantListChanged(participants: List<Participant>) {
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
###
|
|
64
|
+
### Receive-only — no screen-share button
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
68
|
-
.hideScreenSharingButton(true) // hide since Android can't initiate
|
|
69
|
-
.build()
|
|
70
|
-
```
|
|
66
|
+
Android is **receive-only** for screen sharing — there is no screen-share initiation API and no screen-share button setting in `SessionSettingsBuilder`. There is nothing to hide; the SDK simply renders incoming screen shares from web clients.
|
|
71
67
|
|
|
72
68
|
## Gotchas
|
|
73
69
|
|
|
74
|
-
- Android **cannot initiate** screen sharing — only web clients can
|
|
70
|
+
- Android **cannot initiate** screen sharing — only web clients can; the SDK is receive-only
|
|
71
|
+
- There is no screen-share button or `hideScreenSharingButton(...)` setting on Android
|
|
75
72
|
- The SDK automatically adjusts the layout when a screen share starts
|
|
76
73
|
- Use `participant.isPresenting` to check if someone is sharing
|
|
77
|
-
-
|
|
78
|
-
- `MediaEventsListener` also has `onScreenShareStarted()`/`onScreenShareStopped()` for local events
|
|
74
|
+
- Screen-share is observed via `ParticipantEventListener.onParticipantStartedScreenShare(...)` / `onParticipantStoppedScreenShare(...)`
|
|
79
75
|
|
|
80
76
|
## Sample App Reference
|
|
81
77
|
|
|
@@ -17,7 +17,7 @@ import com.cometchat.calls.core.CometChatCalls
|
|
|
17
17
|
import com.cometchat.calls.model.SessionType // VIDEO, VOICE
|
|
18
18
|
import com.cometchat.calls.model.LayoutType // TILE, SIDEBAR, SPOTLIGHT
|
|
19
19
|
import com.cometchat.calls.model.AudioMode // SPEAKER, EARPIECE, BLUETOOTH, HEADPHONES
|
|
20
|
-
import com.cometchat.calls.model.CameraFacing // FRONT,
|
|
20
|
+
import com.cometchat.calls.model.CameraFacing // FRONT, REAR
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Implementation
|
|
@@ -38,7 +38,7 @@ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
|
38
38
|
.startAudioMuted(false)
|
|
39
39
|
.startVideoPaused(false)
|
|
40
40
|
.setAudioMode(AudioMode.SPEAKER) // SPEAKER, EARPIECE, BLUETOOTH, HEADPHONES
|
|
41
|
-
.setInitialCameraFacing(CameraFacing.FRONT) // FRONT or
|
|
41
|
+
.setInitialCameraFacing(CameraFacing.FRONT) // FRONT or REAR
|
|
42
42
|
|
|
43
43
|
// Timeout & recording
|
|
44
44
|
.setIdleTimeoutPeriod(300) // seconds (default 300)
|
|
@@ -72,7 +72,7 @@ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
|
72
72
|
| `SessionType` | `VIDEO`, `VOICE` |
|
|
73
73
|
| `LayoutType` | `TILE`, `SIDEBAR`, `SPOTLIGHT` |
|
|
74
74
|
| `AudioMode` | `SPEAKER`, `EARPIECE`, `BLUETOOTH`, `HEADPHONES` |
|
|
75
|
-
| `CameraFacing` | `FRONT`, `
|
|
75
|
+
| `CameraFacing` | `FRONT`, `REAR` |
|
|
76
76
|
|
|
77
77
|
### Common Presets
|
|
78
78
|
|
|
@@ -46,7 +46,7 @@ In app-level `build.gradle.kts`:
|
|
|
46
46
|
```kotlin
|
|
47
47
|
dependencies {
|
|
48
48
|
// CometChat Calls SDK v5
|
|
49
|
-
implementation("com.cometchat:calls-sdk-android:5.0
|
|
49
|
+
implementation("com.cometchat:calls-sdk-android:5.0.+")
|
|
50
50
|
|
|
51
51
|
// If using ringing (dual-SDK), also add Chat SDK:
|
|
52
52
|
// implementation("com.cometchat:chat-sdk-android:4.0.+")
|
|
@@ -70,17 +70,22 @@ private fun handleDeepLink(intent: Intent?) {
|
|
|
70
70
|
## SDK API
|
|
71
71
|
|
|
72
72
|
```kotlin
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
import com.cometchat.calls.core.CometChatCalls
|
|
74
|
+
import com.cometchat.calls.listeners.ButtonClickListener
|
|
75
|
+
|
|
76
|
+
val settings = CometChatCalls.SessionSettingsBuilder()
|
|
77
|
+
.hideShareInviteButton(false)
|
|
75
78
|
.build()
|
|
76
79
|
|
|
77
|
-
|
|
80
|
+
// onShareInviteButtonClicked() lives on ButtonClickListener in v5.
|
|
81
|
+
// Register on the CallSession instance from joinSession's onSuccess callback.
|
|
82
|
+
callSession.addButtonClickListener(activity, object : ButtonClickListener() {
|
|
78
83
|
override fun onShareInviteButtonClicked() {
|
|
79
84
|
activity.runOnUiThread {
|
|
80
85
|
shareCallInvite(sessionId)
|
|
81
86
|
}
|
|
82
87
|
}
|
|
83
|
-
}
|
|
88
|
+
})
|
|
84
89
|
```
|
|
85
90
|
|
|
86
91
|
---
|
|
@@ -48,7 +48,7 @@ callSession.addMediaEventsListener(this, object : MediaEventsListener() {
|
|
|
48
48
|
override fun onCameraFacingChanged(facing: CameraFacing) {
|
|
49
49
|
when (facing) {
|
|
50
50
|
CameraFacing.FRONT -> { /* front camera active */ }
|
|
51
|
-
CameraFacing.
|
|
51
|
+
CameraFacing.REAR -> { /* rear camera active */ }
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
// ... other required overrides
|
|
@@ -56,10 +56,10 @@ callSession.addMediaEventsListener(this, object : MediaEventsListener() {
|
|
|
56
56
|
override fun onAudioUnMuted() {}
|
|
57
57
|
override fun onRecordingStarted() {}
|
|
58
58
|
override fun onRecordingStopped() {}
|
|
59
|
-
override fun onScreenShareStarted() {}
|
|
60
|
-
override fun onScreenShareStopped() {}
|
|
61
59
|
override fun onAudioModeChanged(audioMode: AudioMode) {}
|
|
62
60
|
})
|
|
61
|
+
// Screen-share is observed via ParticipantEventListener.onParticipantStartedScreenShare /
|
|
62
|
+
// onParticipantStoppedScreenShare — NOT MediaEventsListener.
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
### Initial Video Settings (Pre-Session)
|
|
@@ -78,7 +78,7 @@ val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
|
78
78
|
|
|
79
79
|
- `pauseVideo()` / `resumeVideo()` only work during an active session
|
|
80
80
|
- `switchCamera()` toggles between front and back — no parameter needed
|
|
81
|
-
- `CameraFacing` enum: `FRONT`, `
|
|
81
|
+
- `CameraFacing` enum: `FRONT`, `REAR`
|
|
82
82
|
- For voice calls (`SessionType.VOICE`), set `.startVideoPaused(true)`
|
|
83
83
|
- Camera permissions must be granted at runtime before joining
|
|
84
84
|
|
|
@@ -12,7 +12,7 @@ Native VoIP calling using Android's Telecom framework (`ConnectionService`). Sho
|
|
|
12
12
|
|
|
13
13
|
## Prerequisites
|
|
14
14
|
|
|
15
|
-
- Chat SDK v4 (`com.cometchat:chat-sdk-android:4.0.+`) + Calls SDK v5 (`com.cometchat:calls-sdk-android:5.0
|
|
15
|
+
- Chat SDK v4 (`com.cometchat:chat-sdk-android:4.0.+`) + Calls SDK v5 (`com.cometchat:calls-sdk-android:5.0.+`) integrated
|
|
16
16
|
- Firebase Cloud Messaging (FCM) configured with `com.google.gms.google-services` plugin
|
|
17
17
|
- Push notifications enabled in CometChat Dashboard
|
|
18
18
|
- Android 8.0+ (API 26+), compileSdk 35
|
|
@@ -480,7 +480,7 @@ When a call is accepted (via ConnectionService or fallback notification), launch
|
|
|
480
480
|
val isVoiceOnly = callType == CometChatConstants.CALL_TYPE_AUDIO
|
|
481
481
|
val settings = CometChatCalls.SessionSettingsBuilder()
|
|
482
482
|
.setTitle("CometChat Call")
|
|
483
|
-
.
|
|
483
|
+
.setSessionType(if (isVoiceOnly) SessionType.VOICE else SessionType.VIDEO)
|
|
484
484
|
.setLayout(if (isVoiceOnly) LayoutType.SPOTLIGHT else LayoutType.TILE)
|
|
485
485
|
.setAudioMode(if (isVoiceOnly) AudioMode.EARPIECE else AudioMode.SPEAKER)
|
|
486
486
|
.startVideoPaused(isVoiceOnly)
|
|
@@ -3,13 +3,14 @@ name: cometchat-android-v5-components
|
|
|
3
3
|
description: "Complete catalog of CometChat Android UI Kit v5 components. Reference before writing integration code — never invent component names."
|
|
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 components catalog reference ui-kit views"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chat-uikit-android:5.x` (legacy/maintenance-only) component catalog (javap the AAR) + `docs/ui-kit/android`. **Official docs:** https://www.cometchat.com/docs/ui-kit/android/components-overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** `cometchat-android-v5-core` covers initialization and login;
|
|
14
15
|
> `cometchat-android-v5-placement` covers where to put these components;
|
|
15
16
|
> `cometchat-android-v5-customization` covers how to modify component behavior.
|
|
@@ -18,7 +19,7 @@ metadata:
|
|
|
18
19
|
|
|
19
20
|
This is the single source of truth for CometChat Android UI Kit v5 component names, key methods, and usage. **Check this catalog before writing any CometChat view code.** If a component is not listed here, it does not exist in the UI Kit.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Most top-level components extend `MaterialCardView` and can be used in XML layouts or created programmatically. Some lower-level views have different base classes — e.g. `CometChatDate` extends `LinearLayout`, `CometChatMessageReceipt` extends `AppCompatImageView`, `CometChatEmojiKeyboard` extends `BottomSheetDialogFragment`, and `CometChatConfirmDialog` extends `Dialog`. The main components follow a consistent pattern: set a `User` or `Group` object, configure visibility/style via setters, and attach callbacks for user interactions.
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
---
|
|
@@ -213,7 +214,7 @@ Renders a scrollable list of users with alphabetical sticky headers.
|
|
|
213
214
|
| `setSelectionMode(UIKitConstants.SelectionMode)` | Config | `NONE`, `SINGLE`, `MULTIPLE` |
|
|
214
215
|
| `setSearchBoxVisibility(int)` | Visibility | Show/hide search bar |
|
|
215
216
|
| `setUserStatusVisibility(int)` | Visibility | Show/hide online status |
|
|
216
|
-
| `
|
|
217
|
+
| `setOnSelect(OnSelection<User>)` | Callback | Called when selection changes (note: `setOnSelect` for Users + Conversations; `setOnSelection` for Groups + GroupMembers) |
|
|
217
218
|
|
|
218
219
|
### CometChatGroups
|
|
219
220
|
|
|
@@ -3,13 +3,14 @@ name: cometchat-android-v5-core
|
|
|
3
3
|
description: "Foundational rules for CometChat Android UI Kit v5. Initialization, login, UIKitSettings builder, dependency setup, and anti-patterns. Read this first."
|
|
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 core rules initialization login builder patterns"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `com.cometchat:chat-uikit-android:5.x` (+ `chat-sdk-android:4.x`, `calls-sdk-android:5.x`) — `javap` the resolved AARs from the Gradle cache + `docs/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). V5 is legacy/maintenance-only (V6 is current); verify symbols against the resolved AAR.
|
|
13
|
+
|
|
13
14
|
> **Companion skills:** `cometchat-android-v5-components` provides the component
|
|
14
15
|
> catalog (what exists); `cometchat-android-v5-placement` covers where to put
|
|
15
16
|
> chat in your app; `cometchat-android-v5-theming` covers visual customization.
|
|
@@ -57,7 +58,7 @@ The UI Kit transitively pulls in the CometChat Chat SDK. For voice/video calling
|
|
|
57
58
|
```groovy
|
|
58
59
|
dependencies {
|
|
59
60
|
implementation 'com.cometchat:chat-uikit-android:5.+'
|
|
60
|
-
implementation 'com.cometchat:calls-sdk-android:
|
|
61
|
+
implementation 'com.cometchat:calls-sdk-android:5.0.+' // optional — only for calls (V5 calls SDK = 5.x; matches cometchat-android-v5-calls)
|
|
61
62
|
}
|
|
62
63
|
```
|
|
63
64
|
|
|
@@ -471,9 +472,10 @@ class SplashActivity : AppCompatActivity() {
|
|
|
471
472
|
|
|
472
473
|
**Android V5 is the primary home for Visual Builder integration.** The canonical repo at the Android Visual Builder ZIP (download from https://preview.cometchat.com/downloads/cometchat-builder-android.zip) ships **V5-shaped code** — `com.cometchat:chat-uikit-android:5.2.6` + `com.cometchat:calls-sdk-android:4.3.1`. The Gradle plugin `com.cometchat.builder.settings:5.0.1` auto-generates a `CometChatBuilderSettings` constants class from `cometchat-builder-settings.json` at build time. The plugin's output is plain Kotlin `object` declarations — usable from both V5 Views (the canonical path) and V6 Compose / Kotlin Views code, though V6 deps need to be added separately to a V6 project.
|
|
473
474
|
|
|
474
|
-
|
|
475
|
+
> **➡️ FOLLOW THE FULL RECIPE IN `cometchat-android-v6-core` §"Visual Builder integration" AS-IS.** That page holds the complete validated content (`builder export` flow, the Place + patch table, the F50/F51 `BuilderSettingsHelper.kt` transforms, the default Views `MessagesActivity` surface, the Files-patched table). Both skills reference the same V5-shaped canonical, so V5 customers follow it verbatim — it targets V5 deps natively (no shim needed). The only V5-specific deltas are listed under "Differences" below.
|
|
475
476
|
|
|
476
477
|
Validated 2026-05-21 against builder-plugin 5.0.1: `./gradlew :chat-builder:assembleDebug` produces `chat-builder-debug.apk` after applying:
|
|
478
|
+
- **`settings.gradle.kts` — add the Cloudsmith Maven repo `maven("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/")` to BOTH `pluginManagement.repositories` AND `dependencyResolutionManagement.repositories`.** Without it in `pluginManagement`, the `com.cometchat.builder.settings:5.0.1` plugin fails to resolve (`Plugin [id: 'com.cometchat.builder.settings', version: '5.0.1'] was not found`); without it in `dependencyResolutionManagement`, the `chat-uikit-android` / `calls-sdk-android` artifacts fail to resolve. This matches the canonical repo's `settings.gradle.kts` (Cloudsmith present in both blocks).
|
|
477
479
|
- Envelope-wrapped `cometchat-builder-settings.json` (`{ builderId, name, settings: {...} }` — NOT raw settings blob)
|
|
478
480
|
- Two missing-field defaults injected pre-write: `chatFeatures.deeperUserEngagement.mentionAll: true` + `chatFeatures.inAppSounds: { incomingMessageSound: true, outgoingMessageSound: true }`
|
|
479
481
|
- `android.enableJetifier=true` in `gradle.properties`
|