Skip to content
Skillv1.0.0

cometchat-android-v6-builder-settings

CometChat Android UIKit v6 UIKitSettings configuration — all builder options for SDK init, presence, calling, and host overrides

by cometchat(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from cometchat/cometchat-skills (skills/cometchat-android-v6-builder-settings/SKILL.md). Install upstream with npx skills add cometchat/cometchat-skills --skill cometchat-android-v6-builder-settings. Copyright stays with the author (MIT).

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 UIKitSettingsBuilder API

Do not use this skill when

  • Just doing basic init/login (use cometchat-android-v6-core for 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() and subscribePresenceForRoles() — only the last one takes effect
  • NEVER use setAuthKey() in production — use loginWithAuthToken() 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() and overrideClientHost() are for on-premise deployments only — do not use with cloud-hosted CometChat

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/cometchat-cometchat-skills-cometchat-android-v6-builder-9338d9/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

cometchat-cometchat-skills-cometchat-android-v6-builder-9338d9.ocm.jsonjson
{
  "ocm": "1",
  "id": "cometchat-cometchat-skills-cometchat-android-v6-builder-9338d9",
  "kind": "skill",
  "name": "cometchat-android-v6-builder-settings",
  "description": "CometChat Android UIKit v6 UIKitSettings configuration — all builder options for SDK init, presence, calling, and host overrides",
  "publisher": "cometchat",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "cometchat",
      "android",
      "settings",
      "builder",
      "configuration",
      "calling",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "CometChat Android UIKit v6 UIKitSettings configuration — all builder options for SDK init, presence, calling, and host overrides"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/cometchat/cometchat-skills",
      "path": "skills/cometchat-android-v6-builder-settings/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/cometchat/cometchat-skills/blob/HEAD/skills/cometchat-android-v6-builder-settings/SKILL.md",
      "key": "cometchat/cometchat-skills/skills/cometchat-android-v6-builder-settings/SKILL.md"
    },
    "compatibility": "Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x",
    "license": "MIT"
  },
  "instructions": "> **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.\n\n> **Companion skills:** cometchat-android-v6-core (init/login), cometchat-android-v6-push (FCM/VoIP)\n\n## Purpose\n\nDetailed reference for `UIKitSettings.UIKi",
  "cost": {
    "context_tokens": 1382
  }
}

Fetch it by URL: GET /api/v1/registry/cometchat-cometchat-skills-cometchat-android-v6-builder-9338d9/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.

cometchat-android-v6-builder-settings - Skill - OpenSmartRoute