@cometchat/skills 4.0.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.
- package/README.md +42 -2
- package/bin/install.js +448 -57
- package/package.json +1 -1
- package/skills/cometchat/SKILL.md +337 -80
- package/skills/cometchat-a11y/SKILL.md +476 -0
- package/skills/cometchat-android-v5/SKILL.md +1 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +413 -0
- package/skills/cometchat-android-v5-calls/references/README.md +53 -0
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +195 -0
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +91 -0
- package/skills/cometchat-android-v5-calls/references/background-handling.md +168 -0
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +123 -0
- package/skills/cometchat-android-v5-calls/references/call-logs.md +113 -0
- package/skills/cometchat-android-v5-calls/references/call-session.md +274 -0
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +150 -0
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +123 -0
- package/skills/cometchat-android-v5-calls/references/group-calls.md +205 -0
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +111 -0
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +134 -0
- package/skills/cometchat-android-v5-calls/references/join-session.md +120 -0
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +206 -0
- package/skills/cometchat-android-v5-calls/references/participant-management.md +110 -0
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +106 -0
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +242 -0
- package/skills/cometchat-android-v5-calls/references/recording.md +101 -0
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +152 -0
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +82 -0
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +215 -0
- package/skills/cometchat-android-v5-calls/references/session-settings.md +121 -0
- package/skills/cometchat-android-v5-calls/references/setup.md +137 -0
- package/skills/cometchat-android-v5-calls/references/share-invite.md +151 -0
- package/skills/cometchat-android-v5-calls/references/video-controls.md +87 -0
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +526 -0
- package/skills/cometchat-android-v5-components/SKILL.md +1 -1
- package/skills/cometchat-android-v5-core/SKILL.md +1 -1
- package/skills/cometchat-android-v5-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v5-extensions/SKILL.md +1 -1
- package/skills/cometchat-android-v5-features/SKILL.md +1 -1
- package/skills/cometchat-android-v5-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v5-production/SKILL.md +1 -1
- package/skills/cometchat-android-v5-push/SKILL.md +1 -1
- package/skills/cometchat-android-v5-testing/SKILL.md +1 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-android-v6/SKILL.md +1 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +1 -1
- package/skills/cometchat-android-v6-calls/SKILL.md +375 -0
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +97 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +91 -0
- package/skills/cometchat-android-v6-calls/references/call-session.md +163 -0
- package/skills/cometchat-android-v6-calls/references/device-management.md +171 -0
- package/skills/cometchat-android-v6-calls/references/group-calls.md +191 -0
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +107 -0
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +136 -0
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +186 -0
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +176 -0
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +127 -0
- package/skills/cometchat-android-v6-calls/references/share-invite.md +105 -0
- package/skills/cometchat-android-v6-compose-components/SKILL.md +2 -2
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v6-core/SKILL.md +1 -1
- package/skills/cometchat-android-v6-events/SKILL.md +1 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +1 -1
- package/skills/cometchat-android-v6-features/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +1 -1
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +1 -1
- package/skills/cometchat-android-v6-migration/SKILL.md +398 -0
- package/skills/cometchat-android-v6-production/SKILL.md +1 -1
- package/skills/cometchat-android-v6-push/SKILL.md +1 -1
- package/skills/cometchat-android-v6-testing/SKILL.md +1 -1
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-angular-calls/SKILL.md +511 -0
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +95 -0
- package/skills/cometchat-angular-calls/references/call-layouts.md +106 -0
- package/skills/cometchat-angular-calls/references/call-session.md +167 -0
- package/skills/cometchat-angular-calls/references/custom-ui.md +231 -0
- package/skills/cometchat-angular-calls/references/device-management.md +135 -0
- package/skills/cometchat-angular-calls/references/group-calls.md +412 -0
- package/skills/cometchat-angular-calls/references/idle-timeout.md +145 -0
- package/skills/cometchat-angular-calls/references/in-call-chat.md +148 -0
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +205 -0
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +53 -0
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +183 -0
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +285 -0
- package/skills/cometchat-angular-calls/references/raise-hand.md +167 -0
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +267 -0
- package/skills/cometchat-angular-calls/references/ringing-integration.md +131 -0
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +100 -0
- package/skills/cometchat-angular-calls/references/share-invite.md +116 -0
- package/skills/cometchat-angular-components/SKILL.md +1 -1
- package/skills/cometchat-angular-core/SKILL.md +1 -1
- package/skills/cometchat-angular-customization/SKILL.md +1 -1
- package/skills/cometchat-angular-features/SKILL.md +1 -1
- package/skills/cometchat-angular-patterns/SKILL.md +1 -1
- package/skills/cometchat-angular-placement/SKILL.md +1 -1
- package/skills/cometchat-angular-production/SKILL.md +1 -1
- package/skills/cometchat-angular-push/SKILL.md +403 -0
- package/skills/cometchat-angular-testing/SKILL.md +333 -0
- package/skills/cometchat-angular-theming/SKILL.md +1 -1
- package/skills/cometchat-angular-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-astro-patterns/SKILL.md +1 -1
- package/skills/cometchat-calls/SKILL.md +358 -0
- package/skills/cometchat-calls/references/use-case-broadcast.md +194 -0
- package/skills/cometchat-calls/references/use-case-marketplace.md +158 -0
- package/skills/cometchat-calls/references/use-case-support.md +190 -0
- package/skills/cometchat-calls/references/use-case-team.md +169 -0
- package/skills/cometchat-calls/references/use-case-telehealth.md +154 -0
- package/skills/cometchat-components/SKILL.md +1 -1
- package/skills/cometchat-core/SKILL.md +1 -1
- package/skills/cometchat-customization/SKILL.md +2 -2
- package/skills/cometchat-features/SKILL.md +2 -2
- package/skills/cometchat-flutter-v5/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-calls/SKILL.md +325 -94
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +169 -0
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +98 -0
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +330 -0
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +120 -0
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +187 -0
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +97 -0
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +132 -0
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +160 -0
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +244 -0
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +193 -0
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +101 -0
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +142 -0
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-customization/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-events/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-push/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +390 -0
- package/skills/cometchat-flutter-v5-theming/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-calls/SKILL.md +308 -243
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +134 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +102 -0
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +229 -0
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +99 -0
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +190 -0
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +80 -0
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +122 -0
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +268 -0
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +171 -0
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +93 -0
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +102 -0
- package/skills/cometchat-flutter-v6-components/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-core/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-customization/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-events/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-features/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-messages/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-migration/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-placement/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-production/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-push/SKILL.md +452 -0
- package/skills/cometchat-flutter-v6-testing/SKILL.md +319 -0
- package/skills/cometchat-flutter-v6-theming/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +1 -1
- package/skills/cometchat-i18n/SKILL.md +358 -0
- package/skills/cometchat-ios/SKILL.md +5 -5
- package/skills/cometchat-ios-calls/SKILL.md +409 -0
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +172 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +189 -0
- package/skills/cometchat-ios-calls/references/call-layouts.md +136 -0
- package/skills/cometchat-ios-calls/references/call-session.md +221 -0
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +353 -0
- package/skills/cometchat-ios-calls/references/custom-ui.md +322 -0
- package/skills/cometchat-ios-calls/references/device-management.md +171 -0
- package/skills/cometchat-ios-calls/references/group-calls.md +396 -0
- package/skills/cometchat-ios-calls/references/idle-timeout.md +185 -0
- package/skills/cometchat-ios-calls/references/in-call-chat.md +183 -0
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +138 -0
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +246 -0
- package/skills/cometchat-ios-calls/references/raise-hand.md +239 -0
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +339 -0
- package/skills/cometchat-ios-calls/references/ringing-integration.md +142 -0
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +267 -0
- package/skills/cometchat-ios-calls/references/share-invite.md +152 -0
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +246 -0
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +166 -0
- package/skills/cometchat-ios-components/SKILL.md +1 -1
- package/skills/cometchat-ios-core/SKILL.md +1 -1
- package/skills/cometchat-ios-customization/SKILL.md +1 -1
- package/skills/cometchat-ios-features/SKILL.md +1 -1
- package/skills/cometchat-ios-placement/SKILL.md +1 -1
- package/skills/cometchat-ios-production/SKILL.md +1 -1
- package/skills/cometchat-ios-push/SKILL.md +1 -1
- package/skills/cometchat-ios-testing/SKILL.md +371 -0
- package/skills/cometchat-ios-theming/SKILL.md +1 -1
- package/skills/cometchat-ios-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-native-bare-patterns/SKILL.md +45 -3
- package/skills/cometchat-native-calls/SKILL.md +599 -0
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +203 -0
- package/skills/cometchat-native-calls/references/call-layouts.md +124 -0
- package/skills/cometchat-native-calls/references/call-session.md +182 -0
- package/skills/cometchat-native-calls/references/custom-ui.md +250 -0
- package/skills/cometchat-native-calls/references/device-management.md +135 -0
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +179 -0
- package/skills/cometchat-native-calls/references/group-calls.md +291 -0
- package/skills/cometchat-native-calls/references/idle-timeout.md +128 -0
- package/skills/cometchat-native-calls/references/in-call-chat.md +143 -0
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +72 -0
- package/skills/cometchat-native-calls/references/picture-in-picture.md +276 -0
- package/skills/cometchat-native-calls/references/raise-hand.md +203 -0
- package/skills/cometchat-native-calls/references/recording-screen-share.md +290 -0
- package/skills/cometchat-native-calls/references/ringing-integration.md +118 -0
- package/skills/cometchat-native-calls/references/server-push-bridge.md +135 -0
- package/skills/cometchat-native-calls/references/server-push-payloads.md +193 -0
- package/skills/cometchat-native-calls/references/share-invite.md +144 -0
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +317 -0
- package/skills/cometchat-native-components/SKILL.md +1 -1
- package/skills/cometchat-native-core/SKILL.md +1 -1
- package/skills/cometchat-native-customization/SKILL.md +1 -1
- package/skills/cometchat-native-expo-patterns/SKILL.md +18 -1
- package/skills/cometchat-native-features/SKILL.md +1 -1
- package/skills/cometchat-native-placement/SKILL.md +1 -1
- package/skills/cometchat-native-production/SKILL.md +1 -1
- package/skills/cometchat-native-push/SKILL.md +1 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -1
- package/skills/cometchat-native-theming/SKILL.md +1 -1
- package/skills/cometchat-native-troubleshooting/SKILL.md +1 -1
- package/skills/cometchat-nextjs-patterns/SKILL.md +1 -1
- package/skills/cometchat-placement/SKILL.md +29 -1
- package/skills/cometchat-production/SKILL.md +1 -1
- package/skills/cometchat-react-calls/SKILL.md +539 -0
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +145 -0
- package/skills/cometchat-react-calls/references/call-layouts.md +161 -0
- package/skills/cometchat-react-calls/references/call-session.md +235 -0
- package/skills/cometchat-react-calls/references/custom-ui.md +201 -0
- package/skills/cometchat-react-calls/references/device-management.md +206 -0
- package/skills/cometchat-react-calls/references/group-calls.md +262 -0
- package/skills/cometchat-react-calls/references/idle-timeout.md +175 -0
- package/skills/cometchat-react-calls/references/in-call-chat.md +212 -0
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +172 -0
- package/skills/cometchat-react-calls/references/picture-in-picture.md +245 -0
- package/skills/cometchat-react-calls/references/raise-hand.md +238 -0
- package/skills/cometchat-react-calls/references/recording-screen-share.md +143 -0
- package/skills/cometchat-react-calls/references/ringing-integration.md +255 -0
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +241 -0
- package/skills/cometchat-react-calls/references/share-invite.md +176 -0
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +198 -0
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +165 -0
- package/skills/cometchat-react-patterns/SKILL.md +56 -8
- package/skills/cometchat-react-push/SKILL.md +448 -0
- package/skills/cometchat-react-router-patterns/SKILL.md +1 -1
- package/skills/cometchat-react-testing/SKILL.md +404 -0
- package/skills/cometchat-theming/SKILL.md +3 -3
- package/skills/cometchat-troubleshooting/SKILL.md +2 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Share invite on Android V6 (Compose)
|
|
2
|
+
|
|
3
|
+
Same SDK + Intent pattern as V5; Compose adds an idiomatic LocalContext-based share trigger and ViewModel state for in-flight indication.
|
|
4
|
+
|
|
5
|
+
**Canonical docs:** https://www.cometchat.com/docs/calls/android/share-invite
|
|
6
|
+
**Read first:** `cometchat-android-v5-calls/references/share-invite.md` — App Links setup + Intent.createChooser pattern.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ViewModel
|
|
11
|
+
|
|
12
|
+
```kotlin
|
|
13
|
+
class ShareInviteViewModel : ViewModel() {
|
|
14
|
+
private val _sharing = MutableStateFlow(false)
|
|
15
|
+
val sharing: StateFlow<Boolean> = _sharing
|
|
16
|
+
|
|
17
|
+
fun share(context: Context, sessionId: String) {
|
|
18
|
+
if (_sharing.value) return
|
|
19
|
+
_sharing.value = true
|
|
20
|
+
try {
|
|
21
|
+
val url = "https://yourapp.com/call/$sessionId"
|
|
22
|
+
val intent = Intent(Intent.ACTION_SEND).apply {
|
|
23
|
+
type = "text/plain"
|
|
24
|
+
putExtra(Intent.EXTRA_SUBJECT, "Join my call")
|
|
25
|
+
putExtra(Intent.EXTRA_TEXT, "I'm on a call — tap to join.\n$url")
|
|
26
|
+
}
|
|
27
|
+
context.startActivity(Intent.createChooser(intent, "Share call invite"))
|
|
28
|
+
} finally {
|
|
29
|
+
_sharing.value = false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`Context` is short-lived per call — pass via composable arg, don't keep in the ViewModel field.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Compose share button
|
|
40
|
+
|
|
41
|
+
```kotlin
|
|
42
|
+
@Composable
|
|
43
|
+
fun ShareInviteButton(
|
|
44
|
+
sessionId: String,
|
|
45
|
+
viewModel: ShareInviteViewModel = viewModel(),
|
|
46
|
+
) {
|
|
47
|
+
val context = LocalContext.current
|
|
48
|
+
val sharing by viewModel.sharing.collectAsStateWithLifecycle()
|
|
49
|
+
|
|
50
|
+
IconButton(
|
|
51
|
+
onClick = { viewModel.share(context, sessionId) },
|
|
52
|
+
enabled = !sharing,
|
|
53
|
+
) {
|
|
54
|
+
if (sharing) {
|
|
55
|
+
CircularProgressIndicator(modifier = Modifier.size(24.dp), strokeWidth = 2.dp)
|
|
56
|
+
} else {
|
|
57
|
+
Icon(Icons.Default.Share, contentDescription = "Share invite")
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Bridge from SDK event
|
|
66
|
+
|
|
67
|
+
```kotlin
|
|
68
|
+
override fun onShareInviteButtonClicked() {
|
|
69
|
+
val ctx = activityRef.get() ?: return
|
|
70
|
+
Handler(Looper.getMainLooper()).post {
|
|
71
|
+
shareInviteViewModel.share(ctx, sessionId)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`activityRef` should be a `WeakReference<Activity>` set when the call starts and cleared in onPause/onDestroy.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Anti-patterns
|
|
81
|
+
|
|
82
|
+
V5 sister rules apply, plus Compose-specific:
|
|
83
|
+
|
|
84
|
+
1. **Storing `Context` in ViewModel field.** Leak after rotation; ViewModels survive config changes but Activities don't.
|
|
85
|
+
2. **`collectAsState()` instead of `collectAsStateWithLifecycle()`.** Wasted work while paused.
|
|
86
|
+
3. **Strong activity reference in CallsEventsListener.** Use `WeakReference` or pass via `LocalContext.current` from the composable.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Verification checklist
|
|
91
|
+
|
|
92
|
+
- [ ] `Context` passed via composable arg, not stored in ViewModel
|
|
93
|
+
- [ ] `WeakReference<Activity>` for SDK callback bridge
|
|
94
|
+
- [ ] `collectAsStateWithLifecycle` for sharing state
|
|
95
|
+
- [ ] `Intent.createChooser` (not raw ACTION_SEND)
|
|
96
|
+
- [ ] App URL via `BuildConfig.APP_URL`
|
|
97
|
+
- [ ] Real-device smoke: same as V5
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Pointers
|
|
102
|
+
|
|
103
|
+
- `cometchat-android-v5-calls/references/share-invite.md` — V5 sister (Views patterns)
|
|
104
|
+
- `cometchat-android-v6-calls` SKILL.md
|
|
105
|
+
- Canonical docs: https://www.cometchat.com/docs/calls/android/share-invite
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-compose-components
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Jetpack Compose component catalog — all @Composable chat UI components, their parameters, styles, and usage"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -56,7 +56,7 @@ Complete catalog of all Jetpack Compose components in CometChat UIKit v6. Each c
|
|
|
56
56
|
|
|
57
57
|
| Component | Package | Purpose |
|
|
58
58
|
|---|---|---|
|
|
59
|
-
| `CometChatCallButtons` | `presentation.callbuttons.ui` | Audio/video call buttons |
|
|
59
|
+
| `CometChatCallButtons` | `presentation.callbuttons.ui` | Audio/video call buttons — ⚠️ broken at 6.0.0, captures first-rendered user globally; see `cometchat-android-v6-calls` §W4 for workaround |
|
|
60
60
|
| `CometChatIncomingCall` | `presentation.incomingcall.ui` | Incoming call screen |
|
|
61
61
|
| `CometChatOutgoingCall` | `presentation.outgoingcall.ui` | Outgoing call screen |
|
|
62
62
|
| `CometChatOngoingCall` | `presentation.ongoingcall.ui` | Active call screen |
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-compose-customization
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Compose customization — BubbleFactory interface, slot lambdas, @Immutable style classes, and per-slot overrides"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-compose-placement
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Compose placement — setContent, Compose Navigation, Dialog, BottomSheet, and Tab patterns"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-compose-theming
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Jetpack Compose theming — CometChatTheme, CompositionLocal color schemes, typography, shapes, and dark mode"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-core
|
|
|
3
3
|
description: "CometChat Android UIKit v6 core setup — Gradle dependencies, SDK initialization, login/logout, and message sending"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.1"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-events
|
|
|
3
3
|
description: "CometChat Android UIKit v6 event system — SharedFlow-based reactive event bus for messages, calls, users, groups, conversations, and UI events"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-extensions
|
|
|
3
3
|
description: "CometChat Android UIKit v6 extension architecture — DataSource/Repository pattern, custom message types, and data-layer overrides"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-features
|
|
|
3
3
|
description: "CometChat Android UIKit v6 feature catalog — AI features, reactions, polls, stickers, moderation, collaborative, and media features"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-kotlin-components
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Kotlin Views component catalog — all custom View chat UI components, their properties, styles, and usage"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.1"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-kotlin-customization
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Kotlin Views customization — BubbleFactory abstract class, BubbleViewProvider, style classes, and per-slot overrides"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-kotlin-placement
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Kotlin Views placement — Activity, Fragment, BottomSheet, Tab, and Intent navigation patterns"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.1"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-kotlin-theming
|
|
|
3
3
|
description: "CometChat Android UIKit v6 Kotlin Views theming — CometChatTheme singleton, XML attributes, programmatic overrides, typography, and dark mode"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-android-v6-migration
|
|
3
|
+
description: V5→V6 migration recipes for native Android. CometChat ships V5 (chat-uikit-android:5.x — Java + Kotlin Views) and V6 beta (chatuikit-{compose,kotlin}-android:6.x — Compose surface OR Kotlin Views, calls bundled) side-by-side. Covers when to migrate vs stay, the cohort-selection decision (Compose vs Kotlin Views on V6), gradle dependency rewrites, builder API changes (UIKitSettings replaces UIKitSettingsBuilder), theme system rewrite (CometChatTheme.DayNight), calls integration delta (calls bundled — drop calls-sdk-android), Activity theme rules, side-by-side cohort selection during migration, and a verification checklist.
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Migrating FROM com.cometchat:chat-uikit-android:5.x TO com.cometchat:chatuikit-{compose,kotlin}-android:6.0.0-beta2; minSdk 28+ (V6 raised the floor from 21 to 28); Kotlin >= 1.9 for V6 Compose"
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
|
+
metadata:
|
|
8
|
+
author: "CometChat"
|
|
9
|
+
version: "4.0.0"
|
|
10
|
+
tags: "cometchat android v5 v6 migration compose kotlin-views uikit-settings cometchat-theme daynight calls-bundled minsdk gradle migration-recipes"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Migration recipes for moving from CometChat Android UIKit V5 (`chat-uikit-android:5.x`) to V6 (`chatuikit-{compose,kotlin}-android:6.0.0-beta2`). V6 is beta — most production apps should stay on V5 today; this skill is for teams evaluating V6 or planning the eventual migration.
|
|
16
|
+
|
|
17
|
+
V6 is a different SDK, not a drop-in replacement. The migration is roughly the size of jumping from React Native UIKit v5 to v6 — package coordinates, builder APIs, theme system, calls handling all change.
|
|
18
|
+
|
|
19
|
+
**Read these other skills first:**
|
|
20
|
+
- `cometchat-android-v5-core` — current state baseline
|
|
21
|
+
- `cometchat-android-v6-core` — destination state
|
|
22
|
+
- `cometchat-android-v6-builder-settings` — the new UIKitSettings API in detail
|
|
23
|
+
- `cometchat-android-v6-{compose,kotlin}-{components,placement,theming,customization}` — surface-specific destination skills
|
|
24
|
+
- `cometchat-android-v6-calls` — calls migration (calls SDK is bundled in V6)
|
|
25
|
+
|
|
26
|
+
**Ground truth:**
|
|
27
|
+
- V5 source — installed `com.cometchat:chat-uikit-android@5.x` artifacts under `~/.gradle/caches/`
|
|
28
|
+
- V6 source — installed `chatuikit-{compose,kotlin}-android@6.0.0-beta2` artifacts
|
|
29
|
+
- Sister skill — `cometchat-flutter-v6-migration` (different platform, same migration shape)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 1. When to migrate vs stay
|
|
34
|
+
|
|
35
|
+
**Stay on V5 if:**
|
|
36
|
+
|
|
37
|
+
- Your app is in production and stable
|
|
38
|
+
- You're not actively shipping new chat features
|
|
39
|
+
- You don't need V6's specific additions (Compose-first surface, AI Agent integration, Material 3 theming defaults)
|
|
40
|
+
- Your minSdk is 21-27 (V6 requires minSdk 28)
|
|
41
|
+
|
|
42
|
+
**Move to V6 if:**
|
|
43
|
+
|
|
44
|
+
- You're starting a new project
|
|
45
|
+
- You're rewriting your existing app's UI to Compose anyway
|
|
46
|
+
- You need V6 features that aren't backported to V5 (e.g. some AI Agent components)
|
|
47
|
+
- You've validated V6 beta against your use cases on a sample project first
|
|
48
|
+
|
|
49
|
+
**The dispatcher (`cometchat-android-v6`) routes by detected version.** Both V5 and V6 skill sets ship in `npx @cometchat/skills add --family android` — the migration here lives under V6 because that's the destination cohort.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. The cohort decision (Compose vs Kotlin Views)
|
|
54
|
+
|
|
55
|
+
V6 is split into two surfaces:
|
|
56
|
+
|
|
57
|
+
| Surface | Package | When to pick |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| Compose | `com.cometchat:chatuikit-compose-android:6.0.0-beta2` | New apps; existing apps already on Compose |
|
|
60
|
+
| Kotlin Views | `com.cometchat:chatuikit-kotlin-android:6.0.0-beta2` | Existing apps on Java + XML layouts; teams not ready for Compose |
|
|
61
|
+
|
|
62
|
+
**You can mix both in the same app**, but a single chat surface is one or the other — not both.
|
|
63
|
+
|
|
64
|
+
The migration plan asks the user upfront: which surface for each chat screen? Default = match the surrounding app.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 3. Gradle dependency migration
|
|
69
|
+
|
|
70
|
+
### V5 (today)
|
|
71
|
+
|
|
72
|
+
```kotlin
|
|
73
|
+
// app/build.gradle.kts
|
|
74
|
+
dependencies {
|
|
75
|
+
implementation("com.cometchat:chat-uikit-android:5.0.+") // chat
|
|
76
|
+
implementation("com.cometchat:calls-sdk-android:5.0.+") // separate calls SDK
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### V6 (Compose path)
|
|
81
|
+
|
|
82
|
+
```kotlin
|
|
83
|
+
dependencies {
|
|
84
|
+
implementation("com.cometchat:chatuikit-compose-android:6.0.0-beta2")
|
|
85
|
+
// No separate calls SDK — calls bundled into the same artifact
|
|
86
|
+
// Compose dependencies (if not already present)
|
|
87
|
+
implementation(platform("androidx.compose:compose-bom:2024.02.00"))
|
|
88
|
+
implementation("androidx.compose.material3:material3")
|
|
89
|
+
implementation("androidx.compose.ui:ui")
|
|
90
|
+
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### V6 (Kotlin Views path)
|
|
95
|
+
|
|
96
|
+
```kotlin
|
|
97
|
+
dependencies {
|
|
98
|
+
implementation("com.cometchat:chatuikit-kotlin-android:6.0.0-beta2")
|
|
99
|
+
// No separate calls SDK
|
|
100
|
+
// Material Components for theming (`CometChatTheme.DayNight` extends Material themes)
|
|
101
|
+
implementation("com.google.android.material:material:1.11.+")
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### `gradle.properties` rules carry over
|
|
106
|
+
|
|
107
|
+
```properties
|
|
108
|
+
android.useAndroidX=true
|
|
109
|
+
android.enableJetifier=true
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Both still required on V6.
|
|
113
|
+
|
|
114
|
+
### `minSdk` floor
|
|
115
|
+
|
|
116
|
+
V5: minSdk 21. V6: **minSdk 28**. If you're on minSdk 21-27 and want V6, this is the first thing to address — bump minSdk and audit your other dependencies for compatibility.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 4. Init API rewrite
|
|
121
|
+
|
|
122
|
+
### V5 — `UIKitSettingsBuilder`
|
|
123
|
+
|
|
124
|
+
```kotlin
|
|
125
|
+
val settings = UIKitSettingsBuilder()
|
|
126
|
+
.setRegion("us")
|
|
127
|
+
.setAppId(BuildConfig.COMETCHAT_APP_ID)
|
|
128
|
+
.setAuthKey(BuildConfig.COMETCHAT_AUTH_KEY)
|
|
129
|
+
.subscribePresenceForAllUsers()
|
|
130
|
+
.build()
|
|
131
|
+
|
|
132
|
+
CometChatUIKit.init(this, settings, object : CometChat.CallbackListener<String>() {
|
|
133
|
+
override fun onSuccess(s: String) { /* ... */ }
|
|
134
|
+
override fun onError(e: CometChatException) { /* ... */ }
|
|
135
|
+
})
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### V6 — `UIKitSettings.Builder()`
|
|
139
|
+
|
|
140
|
+
```kotlin
|
|
141
|
+
val settings = UIKitSettings.Builder()
|
|
142
|
+
.setAppId(BuildConfig.COMETCHAT_APP_ID)
|
|
143
|
+
.setRegion(BuildConfig.COMETCHAT_REGION)
|
|
144
|
+
.setAuthKey(BuildConfig.COMETCHAT_AUTH_KEY)
|
|
145
|
+
.subscribePresenceForAllUsers()
|
|
146
|
+
.enableCalling() // ← calls toggled on here, not via separate SDK
|
|
147
|
+
.build()
|
|
148
|
+
|
|
149
|
+
CometChatUIKit.init(this, settings) { result ->
|
|
150
|
+
when (result) {
|
|
151
|
+
is CometChatUIKit.Result.Success -> { /* ... */ }
|
|
152
|
+
is CometChatUIKit.Result.Error -> { /* surface to UI */ }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Differences:
|
|
158
|
+
|
|
159
|
+
- Class name: `UIKitSettingsBuilder` → `UIKitSettings.Builder()`
|
|
160
|
+
- Calls: separate SDK init → `.enableCalling()` flag
|
|
161
|
+
- Result: `CallbackListener` → `Result.Success` / `Result.Error` sealed class
|
|
162
|
+
|
|
163
|
+
For full builder option mapping, see `cometchat-android-v6-builder-settings`.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 5. Calls integration migration
|
|
168
|
+
|
|
169
|
+
V5 has a separate `calls-sdk-android` artifact + a separate `CometChatCalls.init`. V6 bundles calls into `chatuikit-{compose,kotlin}-android` and toggles via `.enableCalling()`.
|
|
170
|
+
|
|
171
|
+
### V5 calls init
|
|
172
|
+
|
|
173
|
+
```kotlin
|
|
174
|
+
// In Application.onCreate
|
|
175
|
+
CometChat.init(this, BuildConfig.COMETCHAT_APP_ID, appSettings, /* callback */)
|
|
176
|
+
|
|
177
|
+
val callAppSettings = CallAppSettingsBuilder()
|
|
178
|
+
.setAppId(BuildConfig.COMETCHAT_APP_ID)
|
|
179
|
+
.setRegion(BuildConfig.COMETCHAT_REGION)
|
|
180
|
+
.build()
|
|
181
|
+
CometChatCalls.init(this, callAppSettings, /* callback */)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### V6 calls init
|
|
185
|
+
|
|
186
|
+
```kotlin
|
|
187
|
+
val settings = UIKitSettings.Builder()
|
|
188
|
+
// ... appId, region, authKey ...
|
|
189
|
+
.enableCalling() // ← that's it; calls SDK init happens internally
|
|
190
|
+
.build()
|
|
191
|
+
|
|
192
|
+
CometChatUIKit.init(this, settings) { /* ... */ }
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Permissions + manifest carry over
|
|
196
|
+
|
|
197
|
+
V5's manifest entries (FOREGROUND_SERVICE_*, MANAGE_OWN_CALLS, BIND_TELECOM_CONNECTION_SERVICE, RECORD_AUDIO, CAMERA, POST_NOTIFICATIONS) are unchanged on V6. Same `foregroundServiceType="phoneCall|microphone|camera"` rule applies. See `cometchat-android-v5-calls/references/voip-calling.md` — the VoIP push implementation works as-is on V6.
|
|
198
|
+
|
|
199
|
+
### KEEP `calls-sdk-android:5.0.+` — V6 still needs it as a peer dep
|
|
200
|
+
|
|
201
|
+
**⚠️ Despite vendor marketing of "bundled calling," chatuikit-compose-android:6.0.0 ships without the calls SDK and CRASHES on init without it.** Keep `com.cometchat:calls-sdk-android:5.0.+` in `app/build.gradle.kts` plus apply the W3 stub-class workaround. Full set of five required workarounds is in `cometchat-android-v6-calls` §"Five required workarounds" — apply them all if your app uses calls.
|
|
202
|
+
|
|
203
|
+
Earlier guidance to "drop calls-sdk-android" was wrong; validated end-to-end against a web peer on 2026-05-12 confirmed the dep is mandatory.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 6. Theme system rewrite
|
|
208
|
+
|
|
209
|
+
### V5 — XML theme attrs + style classes
|
|
210
|
+
|
|
211
|
+
```xml
|
|
212
|
+
<!-- res/values/themes.xml -->
|
|
213
|
+
<style name="Theme.YourApp" parent="Theme.Material3.DayNight.NoActionBar">
|
|
214
|
+
<item name="cometchatPrimaryColor">@color/your_primary</item>
|
|
215
|
+
<item name="cometchatBackgroundColor">@color/your_bg</item>
|
|
216
|
+
<!-- ... -->
|
|
217
|
+
</style>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Plus programmatic overrides via `CometChatTheme.getInstance().palette.setPrimary(...)`.
|
|
221
|
+
|
|
222
|
+
### V6 Compose — `CometChatTheme` composable
|
|
223
|
+
|
|
224
|
+
```kotlin
|
|
225
|
+
setContent {
|
|
226
|
+
CometChatTheme(
|
|
227
|
+
colorScheme = lightColorScheme(
|
|
228
|
+
primary = Color(0xFF6750A4),
|
|
229
|
+
// ...
|
|
230
|
+
),
|
|
231
|
+
typography = ourTypography,
|
|
232
|
+
shapes = ourShapes,
|
|
233
|
+
) {
|
|
234
|
+
AppNavigation()
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### V6 Kotlin Views — `CometChatTheme.DayNight` parent
|
|
240
|
+
|
|
241
|
+
```xml
|
|
242
|
+
<!-- res/values/themes.xml -->
|
|
243
|
+
<style name="Theme.YourApp" parent="CometChatTheme.DayNight">
|
|
244
|
+
<item name="cometchatPrimaryColor">@color/your_primary</item>
|
|
245
|
+
<!-- ... -->
|
|
246
|
+
</style>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**CRITICAL:** Activity themes hosting V6 Kotlin Views components MUST inherit from `CometChatTheme.DayNight` (or its `.Light` / `.Dark` variants) — NOT `Theme.AppCompat.*` or `Theme.MaterialComponents.*`. V6 components extend `MaterialCardView` and reference kit-specific theme attrs that aren't in the older theme parents. Crash signature: `Failed to resolve attribute at index N`.
|
|
250
|
+
|
|
251
|
+
This is documented in `cometchat-android-v6-troubleshooting` and surfaced in the V6 calls smoke (calls components are the canary that exposes the bug first).
|
|
252
|
+
|
|
253
|
+
### Migration plan for theme
|
|
254
|
+
|
|
255
|
+
1. Audit V5 theme attrs (`grep cometchat res/values/`)
|
|
256
|
+
2. Map each to its V6 equivalent (most are same names; some have been renamed for Material 3 alignment)
|
|
257
|
+
3. Activity manifest: change `android:theme="@style/Theme.AppCompat.*"` → `android:theme="@style/Theme.YourApp"` where the new theme inherits `CometChatTheme.DayNight`
|
|
258
|
+
4. Programmatic theme overrides: rewrite via Compose `CometChatTheme(colorScheme = ...)` or Kotlin Views `CometChatTheme.singleton.colors.primary = ...` (depending on surface)
|
|
259
|
+
|
|
260
|
+
For full mapping, see `cometchat-android-v6-{compose,kotlin}-theming`.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 7. Component name + import migration
|
|
265
|
+
|
|
266
|
+
The component names (`CometChatConversations`, `CometChatMessageList`, `CometChatMessageHeader`, `CometChatMessageComposer`, `CometChatUsers`, `CometChatGroups`, `CometChatCallButtons`, etc.) are unchanged in V6. The packages differ:
|
|
267
|
+
|
|
268
|
+
### V5 imports
|
|
269
|
+
|
|
270
|
+
```kotlin
|
|
271
|
+
import com.cometchat.chatuikit.conversations.CometChatConversations
|
|
272
|
+
import com.cometchat.chatuikit.messages.CometChatMessageList
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### V6 Compose imports
|
|
276
|
+
|
|
277
|
+
```kotlin
|
|
278
|
+
import com.cometchat.chatuikit.compose.conversations.CometChatConversations
|
|
279
|
+
import com.cometchat.chatuikit.compose.messages.CometChatMessageList
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### V6 Kotlin Views imports
|
|
283
|
+
|
|
284
|
+
```kotlin
|
|
285
|
+
import com.cometchat.chatuikit.kotlin.conversations.CometChatConversations
|
|
286
|
+
import com.cometchat.chatuikit.kotlin.messages.CometChatMessageList
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The skill rewrites imports during migration. Most projects can do a regex sweep:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Compose path
|
|
293
|
+
sed -i 's|com.cometchat.chatuikit.conversations|com.cometchat.chatuikit.compose.conversations|g' app/src/main/kotlin/**/*.kt
|
|
294
|
+
# Kotlin Views path
|
|
295
|
+
sed -i 's|com.cometchat.chatuikit.conversations|com.cometchat.chatuikit.kotlin.conversations|g' app/src/main/kotlin/**/*.kt
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
But verify each rewrite — some V5 modules have been split or merged in V6 in ways the agent should review case-by-case.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## 8. Side-by-side cohort selection
|
|
303
|
+
|
|
304
|
+
V5 and V6 skill sets both ship in `--family android`. During migration, the dispatcher detects which is in use from `app/build.gradle.kts`:
|
|
305
|
+
|
|
306
|
+
- `chat-uikit-android:5.x` only → V5 cohort
|
|
307
|
+
- `chatuikit-{compose,kotlin}-android:6.x` only → V6 cohort
|
|
308
|
+
- Both present → ASK (rare; usually means in-progress migration)
|
|
309
|
+
|
|
310
|
+
For an in-progress migration, you can have V5 and V6 in the same module temporarily, but they'll fight over runtime singletons (`CometChatUIKit.init` exists in both). Best practice: migrate one feature at a time, fully — don't leave a half-migrated state.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## 9. Migration plan template
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
□ Audit current V5 integration
|
|
318
|
+
□ Which V5 skills' patterns are in use?
|
|
319
|
+
□ List Activities / Fragments hosting CometChat surfaces
|
|
320
|
+
□ List custom views, decorators, request builders
|
|
321
|
+
□ List theme attrs in use
|
|
322
|
+
|
|
323
|
+
□ Pick V6 surface
|
|
324
|
+
□ Compose vs Kotlin Views per chat screen
|
|
325
|
+
□ Bump minSdk if below 28
|
|
326
|
+
|
|
327
|
+
□ Update gradle
|
|
328
|
+
□ Remove chat-uikit-android:5.x
|
|
329
|
+
□ KEEP calls-sdk-android:5.0.+ (V6 needs it as peer dep — see §"Drop the calls-sdk-android dependency" above)
|
|
330
|
+
□ Add chatuikit-{compose,kotlin}-android:6.0.0-beta2
|
|
331
|
+
□ Add Compose deps (if applicable) or Material Components (if Kotlin Views)
|
|
332
|
+
|
|
333
|
+
□ Rewrite init
|
|
334
|
+
□ UIKitSettingsBuilder → UIKitSettings.Builder()
|
|
335
|
+
□ Drop separate CometChatCalls.init; add .enableCalling() on UIKitSettings
|
|
336
|
+
□ CallbackListener → Result sealed class
|
|
337
|
+
|
|
338
|
+
□ Rewrite themes
|
|
339
|
+
□ Activity theme parent → CometChatTheme.DayNight (Kotlin Views)
|
|
340
|
+
□ Compose entry uses CometChatTheme composable
|
|
341
|
+
□ Re-map any custom theme attrs
|
|
342
|
+
|
|
343
|
+
□ Rewrite imports
|
|
344
|
+
□ All com.cometchat.chatuikit.* → com.cometchat.chatuikit.{compose,kotlin}.*
|
|
345
|
+
|
|
346
|
+
□ Migrate custom views / decorators / request builders
|
|
347
|
+
□ See cometchat-android-v6-{compose,kotlin}-customization
|
|
348
|
+
|
|
349
|
+
□ Verify build
|
|
350
|
+
□ ./gradlew clean assembleDebug
|
|
351
|
+
□ Resolve any "Duplicate class" errors (drop conflicting V5 deps)
|
|
352
|
+
|
|
353
|
+
□ Smoke on real device
|
|
354
|
+
□ Login → see conversations
|
|
355
|
+
□ Send message
|
|
356
|
+
□ Call (voice + video)
|
|
357
|
+
□ Theme renders correctly (light + dark)
|
|
358
|
+
□ No crashes from theme parent mismatch
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## 10. Common migration failure modes
|
|
364
|
+
|
|
365
|
+
| Symptom | Cause | Fix |
|
|
366
|
+
|---|---|---|
|
|
367
|
+
| Build error: "Duplicate class com.cometchat.chatuikit.*" | Both V5 and V6 deps in `app/build.gradle.kts` | Remove `chat-uikit-android:5.x` |
|
|
368
|
+
| `IllegalArgumentException` at activity start | Activity theme not `CometChatTheme.DayNight` | Update theme parent |
|
|
369
|
+
| Calls don't ring / `E/CallManager: Calling module not found` | chatuikit-compose:6.0.0 needs `calls-sdk-android:5.0.+` as explicit peer + W1–W5 workarounds | See `cometchat-android-v6-calls` §"Five required workarounds" — do NOT remove calls-sdk-android |
|
|
370
|
+
| Theme attrs missing | V5 attr name renamed in V6 | Audit `cometchat-android-v6-{compose,kotlin}-theming` for the V6 attr name |
|
|
371
|
+
| `Failed to resolve attribute at index N` | Activity theme inherits `Theme.AppCompat.*` | Change parent to `CometChatTheme.DayNight` |
|
|
372
|
+
| Init never resolves | V5 `CometChat.init` still being called alongside V6 `CometChatUIKit.init` | Remove the V5 call |
|
|
373
|
+
| `minSdk` build error | Trying to use V6 with minSdk < 28 | Bump minSdk to 28 |
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 11. Verification checklist
|
|
378
|
+
|
|
379
|
+
- [ ] `app/build.gradle.kts` has only one CometChat dep tree (V5 OR V6, not both)
|
|
380
|
+
- [ ] `minSdk = 28` or higher
|
|
381
|
+
- [ ] All V5 imports rewritten to the V6 surface (`compose` or `kotlin` namespace)
|
|
382
|
+
- [ ] `UIKitSettingsBuilder` → `UIKitSettings.Builder()` everywhere
|
|
383
|
+
- [ ] `.enableCalling()` on the builder if calls are used
|
|
384
|
+
- [ ] Activity themes inherit `CometChatTheme.DayNight` (Kotlin Views path)
|
|
385
|
+
- [ ] No `CometChatCalls.init` calls outside what V6 does internally
|
|
386
|
+
- [ ] `calls-sdk-android:5.0.+` retained as explicit peer dep (V6 needs it; despite vendor marketing of "bundled calls")
|
|
387
|
+
- [ ] Build succeeds: `./gradlew clean assembleDebug`
|
|
388
|
+
- [ ] Real-device smoke: login + chat + voice call + video call
|
|
389
|
+
- [ ] Theme smoke: light mode + dark mode + custom palette renders correctly
|
|
390
|
+
|
|
391
|
+
## 12. Pointers
|
|
392
|
+
|
|
393
|
+
- `cometchat-android-v6-core` — V6 init/login/build setup
|
|
394
|
+
- `cometchat-android-v6-builder-settings` — full UIKitSettings options
|
|
395
|
+
- `cometchat-android-v6-{compose,kotlin}-{components,placement,theming,customization}` — destination skills per surface
|
|
396
|
+
- `cometchat-android-v6-calls` — calls integration delta
|
|
397
|
+
- `cometchat-android-v6-troubleshooting` — common V6-specific failure modes (theme parent, R8, Compose runtime)
|
|
398
|
+
- `cometchat-flutter-v6-migration` — sibling skill for Flutter (same migration shape on a different platform)
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-production
|
|
|
3
3
|
description: "CometChat Android UIKit v6 production readiness — token auth, ProGuard/R8, security checklist, release configuration"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-push
|
|
|
3
3
|
description: "CometChat Android UIKit v6 push notifications — FCM setup, chat/call notification handling, VoIP integration, and deep-linking"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|
|
@@ -3,7 +3,7 @@ name: cometchat-android-v6-testing
|
|
|
3
3
|
description: "CometChat Android UIKit v6 testing — unit testing ViewModels, Compose UI testing, Espresso, Maestro, and CI configuration"
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-compose-android:6.x / com.cometchat:chatuikit-kotlin-android:6.x"
|
|
6
|
-
allowed-tools: "
|
|
6
|
+
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
7
|
metadata:
|
|
8
8
|
author: "CometChat"
|
|
9
9
|
version: "3.0.0"
|