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.

SceytChatUIFacade is the internal wiring layer injected into SceytChatUIKit.chatUIFacade. It aggregates every domain interactor and core service into a single accessible object, allowing you to perform channel operations, message operations, user management, attachment handling, and more without needing to interact with Koin directly. You should always access this object through SceytChatUIKit.chatUIFacade rather than constructing it manually. Package: com.sceyt.chatuikit

Interactors

channelInteractor
ChannelInteractor
Provides all channel-level operations: loading channel lists, creating and editing channels, muting, pinning, hiding, deleting, and managing unread counts and draft messages. See ChannelInteractor for the full method reference.
val channel = SceytChatUIKit.chatUIFacade.channelInteractor
    .getChannelFromDb(channelId)
messageInteractor
MessageInteractor
Handles all message operations: paginated loading in both directions, sending, editing, deleting, searching, syncing, and sending markers. See MessageInteractor for the full method reference.
val interactor = SceytChatUIKit.chatUIFacade.messageInteractor
channelMemberInteractor
ChannelMemberInteractor
Manages channel membership: loading members, adding or removing members, changing member roles, and banning/unbanning users from a channel.
userInteractor
UserInteractor
Handles user profile operations: fetching users by ID, updating the current user’s profile and avatar, setting presence state, muting global notifications, and managing the block list. See UserInteractor for the full method reference.
val currentUser = SceytChatUIKit.chatUIFacade.userInteractor.getCurrentUser()
attachmentInteractor
AttachmentInteractor
Paginates through channel attachments by type (media, file, voice, link) and manages attachment metadata, transfer state, checksums, and link previews. See AttachmentInteractor for the full method reference.
messageReactionInteractor
MessageReactionInteractor
Adds, removes, and fetches reactions on messages, and loads per-message reaction scores and voter lists.
messageMarkerInteractor
MessageMarkerInteractor
Reads per-message marker data (delivered, read, played, etc.) for audit and receipt display.
channelInviteKeyInteractor
ChannelInviteKeyInteractor
Generates, revokes, and validates channel invite keys used to construct shareable invite deep links.

Core Services

sceytSyncManager
SceytSyncManager
Orchestrates background synchronisation of channels and messages after a reconnection. Called automatically on connect when SceytChatUIKit.config.syncChannelsAfterConnect is true. You can also trigger or cancel a sync manually.
SceytChatUIKit.chatUIFacade.sceytSyncManager.cancelSync()
filesTransferService
FileTransferService
Manages upload and download queues for message attachments. Tracks transfer progress, handles retries, and exposes per-attachment TransferData state.

Identity

myId
String?
The ID of the authenticated user as known to the facade. Resolves in order: cached clientUserIdClientWrapper.currentUser?.id → persisted preference. Returns null if no user has ever authenticated on this device.
val userId: String? = SceytChatUIKit.chatUIFacade.myId

Token Events

onTokenExpired
SharedFlow<Unit>
Emits a Unit value whenever the server reports that the current authentication token has expired. Subscribe here to trigger a token-refresh flow and call updateToken(...).
SceytChatUIKit.chatUIFacade.onTokenExpired
    .onEach { refreshAndUpdateToken() }
    .launchIn(lifecycleScope)
onTokenWillExpire
SharedFlow<Unit>
Emits a Unit value shortly before the current authentication token expires, giving you a window to proactively refresh it before the connection is interrupted.
SceytChatUIKit.chatUIFacade.onTokenWillExpire
    .onEach { prefetchFreshToken() }
    .launchIn(lifecycleScope)

Methods

updateToken
fun
Sends a new authentication token to the server without requiring a full reconnect. Use this in response to onTokenExpired or onTokenWillExpire.
SceytChatUIKit.chatUIFacade.updateToken(
    token    = freshJwt,
    listener = { success, errorMessage ->
        if (!success) Log.e("Token", "Update failed: $errorMessage")
    }
)
clearData
suspend fun
Wipes all local state: cleans the Room database, clears shared preferences, and resets the in-memory channels cache. This is a suspend function and must be called from a coroutine or another suspend function. It is called automatically by logOut().
viewModelScope.launch {
    SceytChatUIKit.chatUIFacade.clearData()
}
logOut
fun
Performs a full sign-out asynchronously: cancels background sync, cancels pending WorkManager workers, calls clearData(), unregisters the Firebase push token, disconnects the ChatClient, resets the current user, and cancels all displayed push notifications. The optional unregisterPushCallback reports whether the push token was successfully removed from the server. This is the underlying implementation called by SceytChatUIKit.logOut().
SceytChatUIKit.chatUIFacade.logOut { result ->
    if (result.isSuccess) {
        // navigate to login screen
    }
}

Build docs developers (and LLMs) love