Cometchat Android V6 Calls 标志

Cometchat Android V6 Calls

组织
cometchat
cometchat-android-v6-calls

Add voice and video calling to an Android v6 CometChat app — the Calls SDK dependency, the settings-file calling toggle, call buttons in the message header, a global incoming-call listener, outgoing/ongoing call UI, call logs, and the runtime permissions. Triggers: 'add calling to my android app', 'voice video call android cometchat', 'incoming call screen android', 'call logs android', 'why are the call buttons not showing'.

Add to TypingMind

概览

发布者cometchat
代码仓库cometchat-skills
技能名称cometchat-android-v6-calls
星标数
109
复刻数
2
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 cometchat 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Cometchat Android V6 Calls AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-calls
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-android-v6-calls .claude/skills/cometchat-android-v6-calls
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Cometchat Android V6 Calls,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Cometchat Android V6 Calls。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Cometchat Android V6 Calls 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Ground truth: catalog android-v6.json + features.android-v6.json (voice-video-calls) + contracts.android-v6.json (voice-video-calls) + the live pages calling-integration, call-features, components/{call-buttons,incoming-call,outgoing-call,call-logs}, guide-call-log-details. Deep Calls-SDK behavior: the /calls/android docs tree. Verify symbols against the catalog; fetch params from docs; never trust memory.

Companion skills (read first)

  • cometchat-android-v6-core — install, credentials (assets/cometchat-settings.json), initFromSettings → login → render, sizing (references/layout.md), the fetch map. Assumed here, never repeated.
  • cometchat-android-v6-{kotlin,compose}-placement — where the incoming-call surface sits in the app shell.

Use this skill when

"add voice/video calling", "show call buttons in the chat", "handle incoming calls", "add a call history screen", "the call buttons aren't appearing", "call log details".

Calls package + version

Add the Calls SDK alongside your cohort's UI Kit artifact (never instead of it):

kotlin
dependencies {
    implementation("com.cometchat:chatuikit-compose-android:6.0.5")   // or chatuikit-kotlin-android for XML Views
    implementation("com.cometchat:calls-sdk-android:5.0.4")
}

⚠️ REQUIRED whenever android.enableJetifier=true (which core mandates for the Chat SDK's pre-AndroidX transitive) — add a Jetifier ignore-list, or the build breaks the moment you add calling. calls-sdk-android 5.0.x bundles a React-Native stack (react-android / hermes / react-native-webrtc), and Jetifier cannot transform react-android-*.aar — so with Jetifier on, the build dies at checkDebugAarMetadata with Execution failed for JetifyTransform: react-android-0.77.2-debug.aar (the app compiled fine BEFORE calling; adding the artifact breaks it — verified 2026-09-10). These AARs are already AndroidX, so exclude them from Jetifier in gradle.properties:

properties
android.jetifier.ignorelist=react-android,hermes-android,react-native-webrtc

⚠️ The artifact and the flag are a PAIR — setting either alone breaks the app.

· flag true, artifact missing → app crashes at launch (initFromSettings → initCometChatCalls → NoClassDefFoundError: CometChatCalls$SessionSettingsBuilder) · artifact present, flag false → calling components crash when used (RuntimeException: Please call the CometChatCalls.init() method …)

⚠️ BOTH are required — the artifact alone is not enough. uiKit.enableCalling: true in assets/cometchat-settings.json is what makes initFromSettings initialize CometChatCalls. Without it, CometChatCallLogs throws RuntimeException: Please call the CometChatCalls.init() method …; without the artifact it throws NoClassDefFoundError. Both compile fine — device-only failures (verified 2026-08-21).

The kit auto-detects the Calls SDK and activates calling. Also set "uiKit": { "enableCalling": true } in app/src/main/assets/cometchat-settings.json so CometChatUIKit.initFromSettings(...) initializes the Calls SDK through the telemetry-aware path (it auto-inits Calls when that flag is on). Dashboard: calling must be enabled for the app.

Header call buttons differ BY COHORT (verified vs installed 6.0.5 source):

  • Views: automatic — CometChatMessageHeader's voice/video button visibility defaults follow CallsUtils.isCallingEnabled(), so the buttons render with no extra code once calling is enabled.
  • Compose: NOT automatic — the CometChatMessageHeader composable defaults hideVoiceCallButton = true and hideVideoCallButton = true. Pass both explicitly:
    kotlin
    CometChatMessageHeader(user = user, hideVoiceCallButton = false, hideVideoCallButton = false)
    And do NOT use the header's auxiliaryView slot for other icons — it REPLACES the default auxiliary area that hosts the call buttons (they vanish). Extra header icons go in trailingView (see cometchat-android-v6-compose-components).

Call-flow ordering (BAKED — invariant)

  1. Dependency + enableCalling → call buttons appear in the message header (Views: nothing to wire; Compose: pass hideVoiceCallButton = false, hideVideoCallButton = false — see above).
  2. initFromSettings resolves → login resolves (as always) — calling is unavailable before that.

⚠️ Enabling calling in an app with EXISTING sessions — force a fresh login. CometChatUIKit.login() short-circuits when the same uid is already logged in (persisted session): it returns onSuccess WITHOUT calling loginCometChatCalls, so the Calls SDK never gets an auth token (verified vs 6.0.5 CometChatUIKit.kt login + on device 2026-08-25). Symptom: CometChatCallLogs shows a silent error state; logcat says User auth token cannot be null. When calling is FIRST enabled on an app whose users already have a session, users must re-login — CometChatUIKit.logout(...) then CometChatUIKit.login(...) (or force a fresh login path once, e.g. on a calling-feature version bump). During development, wire onError on CometChatCallLogs so this failure is not silent.

  1. Register a GLOBAL call listener so an incoming call rings from anywhere in the app — the docs recommend an Application subclass, registering before the UI Kit is used:
kotlin
import com.cometchat.chat.core.Call            // NOTE: chat.core, NOT chat.models
import com.cometchat.chat.core.CometChat

class BaseApplication : Application() {
    companion object {
        private val LISTENER_ID = "${BaseApplication::class.java.simpleName}${System.currentTimeMillis()}"
    }
    override fun onCreate() {
        super.onCreate()
        CometChat.addCallListener(LISTENER_ID, object : CometChat.CallListener() {
            override fun onIncomingCallReceived(call: Call) { /* show CometChatIncomingCall over the current screen */ }
            override fun onOutgoingCallAccepted(call: Call) { /* proceed to the ongoing-call surface */ }
            override fun onOutgoingCallRejected(call: Call) { /* dismiss the outgoing UI */ }
            override fun onIncomingCallCancelled(call: Call) { /* dismiss the incoming UI */ }
        })
    }
}

Register the Application class in the manifest (android:name=".BaseApplication"). Views: instantiate CometChatIncomingCall(context), set its call, set fitsSystemWindows = true, wire its error handler, and present it (dialog / full-screen overlay). Compose: hold the incoming Call in app-level state and render the incoming-call composable above your nav host — fetch the composable's params from components/incoming-call.md. 4. Permissions — request CAMERA and RECORD_AUDIO at runtime before a call starts (video needs both; audio-only needs RECORD_AUDIO); declare them in the manifest. The kit ships CometChatPermissionHandler / CometChatPermissionActivity — prefer them over a hand-rolled flow.

ℹ️ SoLoader / bundled React-Native native libs (know this before an ACTIVE call). calls-sdk-android 5.0.x bundles a React-Native stack (react-android / hermes / react-native-webrtc), declared at runtime scope in its POM — so they land on the runtime classpath and initFromSettings calls-init + CometChatCallLogs work with no extra deps (verified on device: init succeeds, call logs render). An active call surface loads those native .sos, which on RN ≥ 0.76 depend on SoLoader. If an active call fails to open with a SoLoader/UnsatisfiedLinkError/NoClassDefFoundError (React/JSI/ Hermes symbols), add the RN + SoLoader artifacts on the compile classpath and init SoLoader once in Application.onCreate before the first call surface:

kotlin
// build.gradle.kts (only if an active call throws a SoLoader/native-link error)
implementation("com.facebook.react:react-android:0.77.2")   // match what calls-sdk-android pulls
implementation("com.facebook.soloader:soloader:0.12.1")
// Application.onCreate: SoLoader.init(this, OpenSourceMergedSoMapping)

Whether 5.0.x needs this for an active call is not yet settled from a single device — it is NOT needed for init or call logs. Verify with a real two-device call; treat this as the fix if (and only if) you hit that native-link error, not as an unconditional step.

Calls component / API map (BAKED closed list)

CometChatCallButtons (auto-rendered in the message header; can also be placed standalone) · CometChatIncomingCall (ringing UI — accept/decline) · CometChatOutgoingCall (dialing UI) · CometChatOngoingCall + CometChatOngoingCallActivity / CometChatCallActivity (the in-call surface) · CometChatCallLogs (call history list) + CometChatCallLogsListItem · call bubbles in the message list: CometChatCallActionBubble, CometChatMeetCallBubble · CometChatCallEvent (call events → cometchat-android-v6-events). SDK-side (build-your-own flows): CometChat.initiateCall / acceptCall / rejectCall / getActiveCall / clearActiveCall / addCallListener / removeCallListener — see core/references/docs-map.md → SDK section.

The minimum for "add calling" (contract voice-video-calls): initiate (buttons) + incoming-call UI + outgoing-call UI + call logs. A call button with no incoming-call handler is a dead end — the callee never sees the ring.

kotlin
// Minimum calls surface — four components for voice-video-calls contract
// CometChatCallButtons: auto-rendered in the message header; place standalone when needed
val callButtons = CometChatCallButtons(context)

// CometChatOutgoingCall: shown while the callee hasn't answered yet
val outgoingCall = CometChatOutgoingCall(context)
outgoingCall.call = pendingCall

// CometChatCallActivity / CometChatOngoingCallActivity: the in-call surface, launched
// automatically during a session. ⚠️ You do NOT declare these — BOTH are already declared in the
// UI-Kit AAR manifest and merge in automatically (verified vs 6.0.x). The cohort-correct classes:
//   Compose: com.cometchat.uikit.compose.calls.CometChatCallActivity
//            com.cometchat.uikit.compose.presentation.ongoingcall.ui.CometChatOngoingCallActivity
//   Views:   com.cometchat.uikit.kotlin.calls.CometChatCallActivity
//            com.cometchat.uikit.kotlin.presentation.ongoingcall.ui.CometChatOngoingCallActivity
// (There is NO `com.cometchat.chatuikit.calling.*` class in v6 — that's a v5/v4-era name; do not
// add a manual <activity> line for it or the merge/launch breaks.)

// CometChatCallLogs: call history tab
val callLogs = CometChatCallLogs(context)

Deeper calling features → fetch

IntentPage (append .md)
calling overview / what's supported/ui-kit/android/call-features
call buttons props/ui-kit/android/call-buttons
incoming / outgoing UI props/ui-kit/android/incoming-call · /ui-kit/android/outgoing-call
call logs + details recipe/ui-kit/android/call-logs · /ui-kit/android/guide-call-log-details
custom in-call UI, layouts, recording, screen share, audio modesthe /calls/android/* pages (call-layouts, custom-control-panel, audio-modes, background-handling, idle-timeout, events, …)

Common pitfalls

Importing com.cometchat.chat.models.Call (it is com.cometchat.chat.core.Call — the wrong import compiles to an "Unresolved reference 'Call'" cascade) · manually declaring CometChatCallActivity/CometChatOngoingCallActivity in your manifest (they AUTO-MERGE from the UI-Kit AAR — a hand-written <activity> with the wrong/legacy com.cometchat.chatuikit.calling.* name breaks the launch) · Calls SDK missing (buttons never appear) · enableCalling not set in the settings file · Compose header without hideVoiceCallButton = false / hideVideoCallButton = false (buttons never appear — Compose defaults hide them) · Compose auxiliaryView used for a custom header icon (it replaces the call-button host — use trailingView) · calling enabled on an app with a persisted session without a re-login (Calls SDK tokenless — call logs silently error with "User auth token cannot be null") · no global call listener (incoming calls never ring) · listener registered per-Activity only (rings only on that screen) · registering in Application but forgetting android:name in the manifest · missing runtime CAMERA/RECORD_AUDIO permissions (call fails silently) · calling before login resolves · call UI not fitsSystemWindows / not full-bleed (controls under system bars) · leaking the listener (remove it if you register outside Application) · mixing a v4/v5 calls artifact with the v6 kit.

Verify it works

Compile against the pinned kit (./gradlew :app:assembleDebug # in YOUR app (npm run verify:fences:android-v6 is a pack-repo gate)). On device (TWO devices/emulators + two users — calling can't be verified single-ended): call buttons render in the message header; tapping starts an outgoing call; the OTHER device rings with the incoming UI from any screen; accept → ongoing call with audio/video; decline/cancel dismisses cleanly on both sides; the call appears in CometChatCallLogs and as a call bubble in the chat. No ring ⇒ listener not registered globally (or app not logged in). Permission denial ⇒ handle it and tell the user, don't fail silently.

常见问题

Cometchat Android V6 Calls AI 技能有什么作用?

Add voice and video calling to an Android v6 CometChat app — the Calls SDK dependency, the settings-file calling toggle, call buttons in the message header, a global incoming-call listener, outgoing/ongoing call UI, call logs, and the runtime permissions. Triggers: 'add calling to my android app', 'voice video call android cometchat', 'incoming call screen android', 'call logs android', 'why are the call buttons not showing'.

为什么在 TypingMind 中使用 Cometchat Android V6 Calls?

因为您只需安装一次,就能搭配任何模型使用。Cometchat Android V6 Calls 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Cometchat Android V6 Calls?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-calls。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Cometchat Android V6 Calls?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Cometchat Android V6 Calls 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Cometchat Android V6 Calls 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Cometchat Android V6 Calls AI 技能免费吗?

是的。cometchat 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇