Cometchat android v6 builder settings
Skill cometchat/cometchat-skills/skills/cometchat-android-v6-builder-settings
CometChat Android UIKit v6 UIKitSettings configuration — all builder options for SDK init, presence, calling, and host overridesFrom its SKILL.md
npx -y skills add cometchat/cometchat-skills --skill cometchat-android-v6-builder-settingsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.8 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Ground truth:
com.cometchat:chatuikit-{compose,kotlin}-android:6.x(+calls-sdk-android:5.x) — resolved AAR (javap) +ui-kit/android/v6. Official docs: https://www.cometchat.com/docs/ui-kit/android/v6/overview · Docs MCP:claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp(or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
Companion skills: cometchat-android-v6-core (init/login), cometchat-android-v6-push (FCM/VoIP)
Purpose
Detailed reference for UIKitSettings.UIKitSettingsBuilder — all configuration options for initializing the CometChat SDK, including presence subscriptions, calling features, and host overrides.
Use this skill when
- Configuring presence subscription types (all users, roles, friends)
- Enabling calling features and configuring
CallSettingsBuilder - Overriding admin or client host URLs
- Controlling socket connection behavior
- Understanding the full
UIKitSettingsBuilderAPI
Do not use this skill when
- Just doing basic init/login (use
cometchat-android-v6-corefor quick setup) - Working with UI components or theming
1. UIKitSettingsBuilder — Complete API
import com.cometchat.uikit.core.UIKitSettings
val settings = UIKitSettings.UIKitSettingsBuilder()
// Required
.setAppId("APP_ID") // CometChat App ID
.setRegion("us") // "us" or "eu"
// Authentication (dev only — use token auth in production)
.setAuthKey("AUTH_KEY") // Auth key from dashboard
// Presence subscriptions
.subscribePresenceForAllUsers() // Subscribe to all users' presence
.subscribePresenceForRoles(listOf("admin")) // Subscribe by roles
.subscribePresenceForFriends() // Subscribe to friends' presence
.setRoles(listOf("admin")) // Override the roles list directly (advanced)
// Socket connection
.setAutoEstablishSocketConnection(true) // Auto-connect (default: true)
// Calling
.setEnableCalling(true) // Auto-init CometChatCalls SDK (default: false)
.setCallSettingsBuilder(sessionSettingsBuilder) // Custom call config (optional) — pass a CometChatCalls.SessionSettingsBuilder
// Host overrides (advanced — for on-premise deployments)
.overrideAdminHost("https://custom-admin.example.com")
.overrideClientHost("https://custom-client.example.com")
.build()
2. Presence Subscription Types
Only one subscription type is active at a time. The last one set wins.
| Method | Subscription Type | Use Case |
|---|---|---|
| (none) | "NONE" | No presence updates (default) |
subscribePresenceForAllUsers() | "ALL_USERS" | Small apps where you want all online statuses |
subscribePresenceForRoles(roles) | "ROLES" | Subscribe to specific user roles |
subscribePresenceForFriends() | "FRIENDS" | Social apps with friend lists |
3. Calling Configuration
When setEnableCalling(true) is set, CometChatUIKit.init() automatically initializes the CometChatCalls SDK after the Chat SDK succeeds:
// Basic calling setup
val settings = UIKitSettings.UIKitSettingsBuilder()
.setAppId("APP_ID")
.setRegion("us")
.setAuthKey("AUTH_KEY")
.setEnableCalling(true)
.build()
For custom call settings:
import com.cometchat.calls.core.CometChatCalls
// The kit stores/uses a SessionSettingsBuilder (no-arg ctor) — NOT CallSettingsBuilder.
// setCallSettingsBuilder(Any) casts its arg to CometChatCalls.SessionSettingsBuilder
// internally; passing a CallSettingsBuilder is silently stored as null.
val sessionSettingsBuilder = CometChatCalls.SessionSettingsBuilder()
// configure via the SessionSettingsBuilder setters (see cometchat-android-v6-calls)
val settings = UIKitSettings.UIKitSettingsBuilder()
.setAppId("APP_ID")
.setRegion("us")
.setAuthKey("AUTH_KEY")
.setEnableCalling(true)
.setCallSettingsBuilder(sessionSettingsBuilder) // param typed Any; pass a SessionSettingsBuilder
.build()
After init, retrieve the stored builder:
val builder: CometChatCalls.SessionSettingsBuilder? = CometChatUIKit.getSessionSettingsBuilder()
4. Checking Initialization State
// Chat SDK initialized?
CometChatUIKit.isSDKInitialized()
// Calls SDK initialized? (only true if enableCalling was true AND init succeeded)
CometChatUIKit.isCallsSDKInitialized()
5. Application-Level Init Pattern
From master-app-jetpack, the recommended pattern separates SDK init from Calls SDK init:
class MyApplication : Application() {
fun onSDKInitialized() {
// Called after CometChatUIKit.init() succeeds
// CometChatCalls is auto-initialized if enableCalling = true
// Register call listeners here
addCallListener()
}
}
Hard rules
- NEVER set both
subscribePresenceForAllUsers()andsubscribePresenceForRoles()— only the last one takes effect - NEVER use
setAuthKey()in production — useloginWithAuthToken()instead setEnableCalling(true)requires the CometChatCalls SDK dependency in your Gradle file- If CometChatCalls init fails, the Chat SDK still reports success — check
isCallsSDKInitialized()separately overrideAdminHost()andoverrideClientHost()are for on-premise deployments only — do not use with cloud-hosted CometChat
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most project setup skills give in ~1.3k tokens
Counted across 1,553 of the 3,091 authors here whose files we hold, read 2026-09-06
- Write the configuration filein 36 of 1553
- Create the directory structurein 35 of 1553, across 33 files
- Verify the setupin 31 of 1553, across 28 files
- Run the setup scriptin 30 of 1553, across 29 files
- Pre-determine the required sample sizein 29 of 1553, across 12 files
- Check if the configuration already existsin 29 of 1553
- Document every testin 26 of 1553, across 10 files
- Start with a hypothesisin 26 of 1553, across 11 files
- Ask one question at a timein 22 of 1553
- Test a single variable per testin 21 of 1553, across 9 files
- Read product marketing context before asking questionsin 19 of 1553, across 8 files
- Do not peek and stop earlyin 18 of 1553, across 7 files
Said here and by no other author read
- Use token auth in production
- Verify symbols against installed package
- Check initialization state after setup
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.