@cometchat/skills 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/install.js +298 -41
- package/package.json +1 -1
- package/skills/cometchat/SKILL.md +146 -27
- 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 +1 -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 +1 -1
- 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,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: Set up CometChat Calls SDK v5 for Android. Use when adding SDK dependencies, configuring Cloudsmith maven, CallAppSettings, init, permissions, or Jetifier. Triggers on "setup calls sdk", "add cometchat dependency", "initialize calls", "gradle setup".
|
|
4
|
+
inclusion: manual
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CometChat Calls SDK v5 — Setup
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Install and initialize the CometChat Calls SDK v5 (beta) in an Android project. Covers Cloudsmith maven repository, Gradle dependencies, manifest permissions, Jetifier, and `CometChatCalls.init()`.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Android project with minSdk 26+, compileSdk 35
|
|
16
|
+
- App ID and Region from CometChat Dashboard
|
|
17
|
+
|
|
18
|
+
## Key Imports
|
|
19
|
+
|
|
20
|
+
```kotlin
|
|
21
|
+
import com.cometchat.calls.core.CometChatCalls
|
|
22
|
+
import com.cometchat.calls.core.CallAppSettings
|
|
23
|
+
import com.cometchat.calls.exceptions.CometChatException
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Implementation
|
|
27
|
+
|
|
28
|
+
### 1. Add Cloudsmith Maven Repository
|
|
29
|
+
|
|
30
|
+
In project-level `settings.gradle.kts` (or `build.gradle`):
|
|
31
|
+
|
|
32
|
+
```kotlin
|
|
33
|
+
dependencyResolutionManagement {
|
|
34
|
+
repositories {
|
|
35
|
+
google()
|
|
36
|
+
mavenCentral()
|
|
37
|
+
maven { url = uri("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/") }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Add Dependencies
|
|
43
|
+
|
|
44
|
+
In app-level `build.gradle.kts`:
|
|
45
|
+
|
|
46
|
+
```kotlin
|
|
47
|
+
dependencies {
|
|
48
|
+
// CometChat Calls SDK v5
|
|
49
|
+
implementation("com.cometchat:calls-sdk-android:5.0.0-beta.2")
|
|
50
|
+
|
|
51
|
+
// If using ringing (dual-SDK), also add Chat SDK:
|
|
52
|
+
// implementation("com.cometchat:chat-sdk-android:4.0.+")
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Enable Jetifier
|
|
57
|
+
|
|
58
|
+
In `gradle.properties`:
|
|
59
|
+
|
|
60
|
+
```properties
|
|
61
|
+
android.useAndroidX=true
|
|
62
|
+
android.enableJetifier=true
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 4. Java Compatibility
|
|
66
|
+
|
|
67
|
+
In app-level `build.gradle.kts`:
|
|
68
|
+
|
|
69
|
+
```kotlin
|
|
70
|
+
android {
|
|
71
|
+
compileOptions {
|
|
72
|
+
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
73
|
+
targetCompatibility = JavaVersion.VERSION_1_8
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Manifest Permissions
|
|
79
|
+
|
|
80
|
+
In `AndroidManifest.xml`:
|
|
81
|
+
|
|
82
|
+
```xml
|
|
83
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
84
|
+
<uses-permission android:name="android.permission.CAMERA" />
|
|
85
|
+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
|
86
|
+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
87
|
+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 6. Initialize SDK
|
|
91
|
+
|
|
92
|
+
Call once in `Application.onCreate()` or main Activity:
|
|
93
|
+
|
|
94
|
+
```kotlin
|
|
95
|
+
val callAppSettings = CallAppSettings.CallAppSettingBuilder("APP_ID", "REGION").build()
|
|
96
|
+
|
|
97
|
+
CometChatCalls.init(this, callAppSettings, object : CometChatCalls.CallbackListener<String>() {
|
|
98
|
+
override fun onSuccess(message: String) {
|
|
99
|
+
Log.d(TAG, "Calls SDK initialized")
|
|
100
|
+
}
|
|
101
|
+
override fun onError(e: CometChatException) {
|
|
102
|
+
Log.e(TAG, "Init failed: ${e.message}")
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 7. Check Initialization
|
|
108
|
+
|
|
109
|
+
```kotlin
|
|
110
|
+
if (CometChatCalls.isInitialized()) { /* ready */ }
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 8. Authentication
|
|
114
|
+
|
|
115
|
+
Login with UID + API Key (dev only) or Auth Token (production):
|
|
116
|
+
|
|
117
|
+
```kotlin
|
|
118
|
+
CometChatCalls.login(uid, apiKey, object : CometChatCalls.CallbackListener<CallUser>() {
|
|
119
|
+
override fun onSuccess(user: CallUser) { /* logged in */ }
|
|
120
|
+
override fun onError(e: CometChatException) { /* handle error */ }
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Gotchas
|
|
125
|
+
|
|
126
|
+
- `android.enableJetifier=true` is **required** in `gradle.properties` — builds fail without it
|
|
127
|
+
- The maven URL must be `https://dl.cloudsmith.io/public/cometchat/cometchat/maven/` — no trailing path variations
|
|
128
|
+
- Request CAMERA and RECORD_AUDIO permissions at runtime on Android 6.0+
|
|
129
|
+
- Call `CometChatCalls.init()` before any other SDK method
|
|
130
|
+
- If using both Chat SDK and Calls SDK, initialize both separately
|
|
131
|
+
|
|
132
|
+
## Sample App Reference
|
|
133
|
+
|
|
134
|
+
- `PublicSampleApps/calls-sdk-android/settings.gradle.kts` — Cloudsmith maven config
|
|
135
|
+
- `PublicSampleApps/calls-sdk-android/samples/sample-app-ringing/build.gradle.kts` — dependency declarations
|
|
136
|
+
- `PublicSampleApps/calls-sdk-android/gradle.properties` — Jetifier enabled
|
|
137
|
+
- `PublicSampleApps/calls-sdk-android/samples/sample-app-ringing/src/main/kotlin/com/cometchat/samplecallsringing/RingingApplication.kt` — Application class
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Share invite on Android V5 (Views)
|
|
2
|
+
|
|
3
|
+
Same SDK API. Android-specific: `Intent.createChooser(ACTION_SEND)` is the native share sheet pattern; App Links must be configured for the call URL to deep-link.
|
|
4
|
+
|
|
5
|
+
**Canonical docs:** https://www.cometchat.com/docs/calls/android/share-invite
|
|
6
|
+
**Read first:** `cometchat-react-calls/references/share-invite.md` — deep-link rule + UX.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Hard rule: App Links
|
|
11
|
+
|
|
12
|
+
Configure deep-link routing in `AndroidManifest.xml`:
|
|
13
|
+
|
|
14
|
+
```xml
|
|
15
|
+
<activity
|
|
16
|
+
android:name=".MainActivity"
|
|
17
|
+
android:launchMode="singleTask"
|
|
18
|
+
android:exported="true">
|
|
19
|
+
|
|
20
|
+
<intent-filter android:autoVerify="true">
|
|
21
|
+
<action android:name="android.intent.action.VIEW" />
|
|
22
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
23
|
+
<category android:name="android.intent.category.BROWSABLE" />
|
|
24
|
+
<data
|
|
25
|
+
android:scheme="https"
|
|
26
|
+
android:host="yourapp.com"
|
|
27
|
+
android:pathPrefix="/call" />
|
|
28
|
+
</intent-filter>
|
|
29
|
+
</activity>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Host `assetlinks.json` at `https://yourapp.com/.well-known/assetlinks.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
[{
|
|
36
|
+
"relation": ["delegate_permission/common.handle_all_urls"],
|
|
37
|
+
"target": {
|
|
38
|
+
"namespace": "android_app",
|
|
39
|
+
"package_name": "com.yourapp",
|
|
40
|
+
"sha256_cert_fingerprints": ["AB:CD:EF:..."]
|
|
41
|
+
}
|
|
42
|
+
}]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Handle in MainActivity:
|
|
46
|
+
|
|
47
|
+
```kotlin
|
|
48
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
|
49
|
+
super.onCreate(savedInstanceState)
|
|
50
|
+
handleDeepLink(intent)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
override fun onNewIntent(intent: Intent) {
|
|
54
|
+
super.onNewIntent(intent)
|
|
55
|
+
handleDeepLink(intent)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private fun handleDeepLink(intent: Intent?) {
|
|
59
|
+
val data = intent?.data ?: return
|
|
60
|
+
val segments = data.pathSegments
|
|
61
|
+
if (segments.size >= 2 && segments[0] == "call") {
|
|
62
|
+
val sessionId = segments[1]
|
|
63
|
+
router.routeToCall(sessionId)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## SDK API
|
|
71
|
+
|
|
72
|
+
```kotlin
|
|
73
|
+
val settings = CallSettingsBuilder(activity)
|
|
74
|
+
.setHideShareInviteButton(false)
|
|
75
|
+
.build()
|
|
76
|
+
|
|
77
|
+
val callsEventsListener = object : CometChatCallsEventsListener {
|
|
78
|
+
override fun onShareInviteButtonClicked() {
|
|
79
|
+
activity.runOnUiThread {
|
|
80
|
+
shareCallInvite(sessionId)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Intent.createChooser
|
|
89
|
+
|
|
90
|
+
```kotlin
|
|
91
|
+
fun Activity.shareCallInvite(sessionId: String) {
|
|
92
|
+
val url = "https://yourapp.com/call/$sessionId"
|
|
93
|
+
val intent = Intent(Intent.ACTION_SEND).apply {
|
|
94
|
+
type = "text/plain"
|
|
95
|
+
putExtra(Intent.EXTRA_SUBJECT, "Join my call")
|
|
96
|
+
putExtra(Intent.EXTRA_TEXT, "I'm on a call — tap to join.\n$url")
|
|
97
|
+
}
|
|
98
|
+
startActivity(Intent.createChooser(intent, "Share call invite"))
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`Intent.createChooser` always shows the picker (even if a default is set) — important when invitees commonly use multiple apps (WhatsApp, SMS, email).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Clipboard fallback
|
|
107
|
+
|
|
108
|
+
Some users prefer to copy the link explicitly:
|
|
109
|
+
|
|
110
|
+
```kotlin
|
|
111
|
+
fun Context.copyCallLink(sessionId: String) {
|
|
112
|
+
val url = "https://yourapp.com/call/$sessionId"
|
|
113
|
+
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
|
114
|
+
clipboard.setPrimaryClip(ClipData.newPlainText("Call link", url))
|
|
115
|
+
|
|
116
|
+
// Android 13+ shows system toast automatically; older versions need explicit
|
|
117
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
|
118
|
+
Toast.makeText(this, "Link copied", Toast.LENGTH_SHORT).show()
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Anti-patterns
|
|
126
|
+
|
|
127
|
+
Web sister rules apply, plus Android-specific:
|
|
128
|
+
|
|
129
|
+
1. **`Intent.ACTION_SEND` without `Intent.createChooser`.** Default app gets used silently — user may want a different app.
|
|
130
|
+
2. **No `assetlinks.json` hosted.** App Links don't auto-verify, falls back to "Open with..." dialog.
|
|
131
|
+
3. **Hard-coded URL string.** Use `BuildConfig.APP_URL` set via Gradle build flavors.
|
|
132
|
+
4. **Copying URL to clipboard then showing manual toast on Android 13+.** Duplicate toast (system + manual).
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Verification checklist
|
|
137
|
+
|
|
138
|
+
- [ ] `<intent-filter>` with `autoVerify="true"` for `/call/*`
|
|
139
|
+
- [ ] `assetlinks.json` hosted + reachable
|
|
140
|
+
- [ ] `handleDeepLink` covers both `onCreate` and `onNewIntent`
|
|
141
|
+
- [ ] `Intent.createChooser` wraps the share intent
|
|
142
|
+
- [ ] App URL via `BuildConfig.APP_URL` (not hard-coded)
|
|
143
|
+
- [ ] Real-device smoke: share to WhatsApp → tap from another device → opens your app at the call
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Pointers
|
|
148
|
+
|
|
149
|
+
- `cometchat-react-calls/references/share-invite.md` — sister
|
|
150
|
+
- `cometchat-android-v5-calls` SKILL.md
|
|
151
|
+
- Canonical docs: https://www.cometchat.com/docs/calls/android/share-invite
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: video-controls
|
|
3
|
+
description: Control video during calls — pause/resume camera, switch front/back camera. Use when implementing camera toggle, camera switch, or custom video buttons. Triggers on "pause video", "resume video", "switch camera", "camera toggle", "video controls".
|
|
4
|
+
inclusion: manual
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CometChat Calls SDK v5 — Video Controls
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Programmatically control the local camera (pause/resume) and switch between front/back cameras during an active call.
|
|
12
|
+
|
|
13
|
+
## Key Imports
|
|
14
|
+
|
|
15
|
+
```kotlin
|
|
16
|
+
import com.cometchat.calls.core.CallSession
|
|
17
|
+
import com.cometchat.calls.model.CameraFacing
|
|
18
|
+
import com.cometchat.calls.listeners.MediaEventsListener
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Implementation
|
|
22
|
+
|
|
23
|
+
### Pause / Resume Video
|
|
24
|
+
|
|
25
|
+
```kotlin
|
|
26
|
+
val callSession = CallSession.getInstance()
|
|
27
|
+
|
|
28
|
+
callSession.pauseVideo() // turn off camera
|
|
29
|
+
callSession.resumeVideo() // turn on camera
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Switch Camera
|
|
33
|
+
|
|
34
|
+
```kotlin
|
|
35
|
+
callSession.switchCamera() // toggle front ↔ back
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Listen for Video Events
|
|
39
|
+
|
|
40
|
+
```kotlin
|
|
41
|
+
callSession.addMediaEventsListener(this, object : MediaEventsListener() {
|
|
42
|
+
override fun onVideoPaused() {
|
|
43
|
+
// Update video button to "off" state, show avatar
|
|
44
|
+
}
|
|
45
|
+
override fun onVideoResumed() {
|
|
46
|
+
// Update video button to "on" state, show video
|
|
47
|
+
}
|
|
48
|
+
override fun onCameraFacingChanged(facing: CameraFacing) {
|
|
49
|
+
when (facing) {
|
|
50
|
+
CameraFacing.FRONT -> { /* front camera active */ }
|
|
51
|
+
CameraFacing.BACK -> { /* rear camera active */ }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// ... other required overrides
|
|
55
|
+
override fun onAudioMuted() {}
|
|
56
|
+
override fun onAudioUnMuted() {}
|
|
57
|
+
override fun onRecordingStarted() {}
|
|
58
|
+
override fun onRecordingStopped() {}
|
|
59
|
+
override fun onScreenShareStarted() {}
|
|
60
|
+
override fun onScreenShareStopped() {}
|
|
61
|
+
override fun onAudioModeChanged(audioMode: AudioMode) {}
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Initial Video Settings (Pre-Session)
|
|
66
|
+
|
|
67
|
+
```kotlin
|
|
68
|
+
val sessionSettings = CometChatCalls.SessionSettingsBuilder()
|
|
69
|
+
.setSessionType(SessionType.VIDEO)
|
|
70
|
+
.startVideoPaused(false) // start with camera on
|
|
71
|
+
.setInitialCameraFacing(CameraFacing.FRONT) // start with front camera
|
|
72
|
+
.hideToggleVideoButton(false) // show video toggle
|
|
73
|
+
.hideSwitchCameraButton(false) // show camera switch
|
|
74
|
+
.build()
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Gotchas
|
|
78
|
+
|
|
79
|
+
- `pauseVideo()` / `resumeVideo()` only work during an active session
|
|
80
|
+
- `switchCamera()` toggles between front and back — no parameter needed
|
|
81
|
+
- `CameraFacing` enum: `FRONT`, `BACK`
|
|
82
|
+
- For voice calls (`SessionType.VOICE`), set `.startVideoPaused(true)`
|
|
83
|
+
- Camera permissions must be granted at runtime before joining
|
|
84
|
+
|
|
85
|
+
## Sample App Reference
|
|
86
|
+
|
|
87
|
+
- `CallActivity.kt` — Sets `startVideoPaused(true)` for voice calls
|