Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sceyt/sceyt-chat-android-uikit/llms.txt

Use this file to discover all available pages before exploring further.

SceytChatUIKit is the top-level singleton entry point for the Sceyt Chat Android UIKit. You call initialize(...) once in your Application.onCreate() to wire up the underlying ChatClient, the Koin dependency-injection container, and emoji support. After that, the singleton exposes properties for theming, configuration, formatters, providers, renderers, notifications, and navigation, as well as methods to manage the connection lifecycle and access the full SceytChatUIFacade for interactors and core services. Package: com.sceyt.chatuikit

Initialization

initialize
fun
Bootstraps the UIKit. Must be called once, typically in Application.onCreate(). It initialises the underlying ChatClient, starts the Koin DI container, and sets up emoji support.
SceytChatUIKit.initialize(
    appContext   = this,
    apiUrl       = "https://us-ohio-api.sceyt.com",
    appId        = "8lwox2ge93",
    clientId     = UUID.randomUUID().toString(),
    enableDatabase = true
)

Connection Management

connect
fun
Connects the ChatClient to the Sceyt server using the supplied JWT or token string.
SceytChatUIKit.connect(token = myJwtToken)
reconnect
fun
Triggers a reconnection attempt on the underlying ChatClient. Use this after a network disruption when you need to force an immediate retry rather than waiting for the automatic reconnect logic.
SceytChatUIKit.reconnect()
disconnect
fun
Disconnects the ChatClient from the Sceyt server without clearing local data.
SceytChatUIKit.disconnect()
logOut
fun
Performs a full log-out: cancels background sync, cancels pending workers, clears the local database and preferences, unregisters the Firebase push token, disconnects the client, and cancels all displayed notifications. The optional unregisterPushCallback reports whether the push token was successfully unregistered.
SceytChatUIKit.logOut { result ->
    if (result.isSuccess) {
        // navigate to login screen
    }
}

Logging

setLogger
fun
Installs a custom logger and sets the minimum log level. Call before initialize to capture early log output.
SceytChatUIKit.setLogger(
    logLevel = SceytLogLevel.Verbose,
    logger   = MyTimberLogger()
)

Read-Only Properties

chatClient
ChatClient
Returns the singleton com.sceyt.chat.ChatClient instance. Available immediately after initialize.
val client: ChatClient = SceytChatUIKit.chatClient
currentUserId
String?
The ID of the currently authenticated user, or null if no user is connected. Reads from UserInteractor.getCurrentUserId().
val userId: String? = SceytChatUIKit.currentUserId
currentUser
SceytUser?
The full SceytUser profile of the currently authenticated user, mapped from ClientWrapper.currentUser. Returns null before a successful connect.
val user: SceytUser? = SceytChatUIKit.currentUser
version
String
The Maven artifact version string of the UIKit library (e.g. "2.1.5").
Log.d("UIKit", "Version: ${SceytChatUIKit.version}")

Mutable Configuration Properties

theme
SceytChatUIKitTheme
Controls the global visual theme — colors, fonts, and style overrides applied across all UIKit screens. Replace or mutate before the first UI interaction.
SceytChatUIKit.theme = SceytChatUIKitTheme().apply {
    // customise theme properties
}
config
SceytChatUIKitConfig
The main configuration object. Covers query limits, presence, channel types, member roles, push notifications, voice recording, search, message constraints, and media resizing. See Configuration for the full property list.
SceytChatUIKit.config.hardDeleteMessageForAll = true
SceytChatUIKit.config.messageReactionPerUserLimit = 4
formatters
SceytChatUIKitFormatters
A collection of formatter lambdas used to transform raw data into display strings (timestamps, user names, channel subjects, file sizes, etc.). Override individual formatters to customise how values appear in the UI.
providers
SceytChatUIKitProviders
Pluggable providers that supply contextual data to UIKit components, such as attachment previews, avatar URLs, or mention suggestions.
renderers
SceytChatUIKitRenderers
Custom view renderers for message cells, attachment thumbnails, and other compound views. Replace a renderer to inject your own layouts.
notifications
SceytNotifications
Entry point for configuring push and in-app notification behaviour. Provides access to pushNotification.notificationHandler, channel grouping, and notification style.
SceytChatUIKit.notifications.pushNotification.notificationHandler
    .setSmallIcon(R.drawable.ic_notification)
navigator
SceytChatUIKitNavigator
Controls screen navigation within the UIKit. Replace the default DefaultSceytChatUIKitNavigator to intercept or override Activity/Fragment transitions.
chatTokenProvider
ChatTokenProvider?
An optional provider that the UIKit calls when it needs a fresh authentication token (e.g. on token expiry). Implement ChatTokenProvider and assign it here to enable automatic token renewal.
SceytChatUIKit.chatTokenProvider = ChatTokenProvider { callback ->
    myAuthService.getFreshToken { token -> callback(token) }
}
messageTransformer
MessageTransformer?
An optional transformer applied to every outgoing Message object before it is sent. Use it to inject custom metadata, modify body text, or attach additional payload fields.
chatUIFacade
SceytChatUIFacade
The internal wiring layer that aggregates all interactors, the sync manager, and the file-transfer service. Injected via Koin and available after initialize. See SceytChatUIFacade for the full API.
val channelInteractor = SceytChatUIKit.chatUIFacade.channelInteractor

Build docs developers (and LLMs) love