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.

The Sceyt Chat Android UIKit compresses images and videos before upload, records voice messages through a built-in recorder, and manages file transfers via a dedicated foreground service. All of these subsystems are configurable through properties on SceytChatUIKit.config, letting you balance quality, upload speed, and storage usage for your specific use case.

Image Resizing

Images selected from the gallery or captured with the camera are resized before being attached to a message. Two separate resize targets let you apply different quality settings to avatars versus message attachments.

Message Attachments

SceytChatUIKit.config.imageAttachmentResizeConfig = ResizeConfig.Medium // default

Channel and User Avatars

SceytChatUIKit.config.avatarResizeConfig = ResizeConfig.Low // default

ResizeConfig Values

ResizeConfig is an open class with three built-in presets. Each preset controls the maximum dimension threshold (in pixels) and JPEG compression quality:
PresetdimensionThresholdcompressionQualityRecommended for
ResizeConfig.Low720 px80 %Avatars, thumbnails
ResizeConfig.Medium1080 px80 %Message photos (default)
ResizeConfig.High1600 px90 %High-fidelity image sharing
You can also provide a fully custom configuration by subclassing ResizeConfig:
SceytChatUIKit.config.imageAttachmentResizeConfig = object : ResizeConfig(
    dimensionThreshold = 1280,
    compressionQuality = 85
) {}

Video Resizing

Video attachments are transcoded through an internal CustomVideoCompressor pipeline. Configure the target quality with VideoResizeConfig:
SceytChatUIKit.config.videoAttachmentResizeConfig = VideoResizeConfig.Medium // default

VideoResizeConfig Values

PresetdimensionThresholdcompressionQualityframeRatebitrate
VideoResizeConfig.Low800 px80 %30 fps500 000 bps
VideoResizeConfig.Medium1200 px80 %30 fps1 000 000 bps
VideoResizeConfig.High1600 px80 %30 fps2 000 000 bps
Provide a custom preset by subclassing VideoResizeConfig:
SceytChatUIKit.config.videoAttachmentResizeConfig = object : VideoResizeConfig(
    dimensionThreshold = 1080,
    compressionQuality = 80,
    frameRate = 30,
    bitrate = 1_500_000
) {}

Voice Recorder

The built-in voice recorder is configured via SceytChatUIKit.config.voiceRecorderConfig, which accepts a VoiceRecorderConfig data class:
data class VoiceRecorderConfig(
    val maxDuration: VoiceRecorderDuration = VoiceRecorderDuration.MaxDuration(5 * 60 * 1000L),
    val bitrate: Int = 32_000,
    val simplingRate: Int = 16_000,
)
PropertyDefaultDescription
maxDuration5 minutesEither VoiceRecorderDuration.Unlimited or VoiceRecorderDuration.MaxDuration(ms)
bitrate32 000 bpsAudio bitrate of the recorded voice file
simplingRate16 000 HzAudio sampling rate

Example: Allowing unlimited-length voice messages

SceytChatUIKit.config.voiceRecorderConfig = VoiceRecorderConfig(
    maxDuration = VoiceRecorderDuration.Unlimited,
    bitrate = 32_000,
    simplingRate = 16_000
)
The property is spelled simplingRate in the source (not samplingRate). Use the exact name shown above when constructing a custom VoiceRecorderConfig.

Attachment Selection Limit

The maximum number of files a user can attach in a single message is controlled by attachmentSelectionLimit. It accepts values from 1 to 50, with a default of 20.
SceytChatUIKit.config.attachmentSelectionLimit = 10

File Transfer Service

Attachment uploads run inside a bound foreground service accessed through SceytChatUIKit.chatUIFacade.filesTransferService. UIKit manages the service lifecycle automatically, but you can interact with it for monitoring or advanced control:
val transferService = SceytChatUIKit.chatUIFacade.filesTransferService
The file transfer service notification — the persistent notification shown while an upload is in progress — is customizable through SceytChatUIKit.notifications.fileTransferServiceNotification. See the Notification Style guide for details.

Media Preview

Full-screen media preview is opened through Destination.MediaPreview. Pass a MediaPreviewParams.SingleAttachment to view a single file with server-side pagination, or MediaPreviewParams.PreloadedList to browse a locally prepared list without extra network calls:
// Open a single attachment, load neighbors from the server
SceytChatUIKit.navigator.navigate(
    context = this,
    destination = Destination.MediaPreview(
        params = MediaPreviewParams.SingleAttachment(
            attachment = attachment,
            from = senderUser,
            channelId = channel.id,
            sourceView = imageView    // enables shared-element transition
        )
    )
)

// Open a preloaded list (e.g., gallery inside ChannelInfo)
SceytChatUIKit.navigator.navigate(
    context = this,
    destination = Destination.MediaPreview(
        params = MediaPreviewParams.PreloadedList(
            items = attachments,
            initialIndex = clickedIndex,
            sourceView = imageView
        )
    )
)

Build docs developers (and LLMs) love