Skip to main content
The CometChatBuilderSettings.kt file handles basic feature toggles. For deeper customizations, modify component props using BuilderSettingsHelper or edit the source code directly.

Understanding the Customization Architecture

The Android UI Kit Builder uses two main files for customization:
FilePurposeWhen to Modify
CometChatBuilderSettings.ktAuto-generated feature flags and configuration constantsFunctional changes (enable/disable features)
themes.xmlTheme styles, colors, and typographyUI/visual changes (colors, fonts, spacing)
BuilderSettingsHelper.ktUtility class that applies settings to UI componentsComponent-level customizations
CometChatBuilderSettings.kt is auto-generated by the Builder plugin from your cometchat-builder-settings.json file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.

Using BuilderSettingsHelper

The BuilderSettingsHelper is a utility class that applies your Builder configuration to CometChat UI components. It reads values from CometChatBuilderSettings and configures component properties accordingly.

How It Works

  1. Import the helper into your Activity or Fragment
  2. Get a reference to your CometChat UI component
  3. Call the appropriate method to apply settings

Component-Level Customizations

MessageHeader

The applySettingsToMessageHeader method configures call buttons and user status visibility based on your Builder settings.
Settings Applied:
SettingPropertyDescription
VoiceAndVideoCalling.ONEONONEVOICECALLINGvoiceCallButtonVisibilityShows/hides voice call button for 1:1 chats
VoiceAndVideoCalling.ONEONONEVIDEOCALLINGvideoCallButtonVisibilityShows/hides video call button for 1:1 chats
VoiceAndVideoCalling.GROUPVOICECONFERENCEvoiceCallButtonVisibilityShows/hides voice call button for groups
VoiceAndVideoCalling.GROUPVIDEOCONFERENCEvideoCallButtonVisibilityShows/hides video call button for groups
CoreMessagingExperience.USERANDFRIENDSPRESENCEuserStatusVisibilityShows/hides online status indicator

MessageList

The applySettingsToMessageList method configures message options, reactions, AI features, and more.
Settings Applied:
SettingPropertyDescription
CoreMessagingExperience.THREADCONVERSATIONANDREPLIESreplyInThreadOptionVisibilityShows/hides reply in thread option
CoreMessagingExperience.EDITMESSAGEeditMessageOptionVisibilityShows/hides edit message option
CoreMessagingExperience.DELETEMESSAGEdeleteMessageOptionVisibilityShows/hides delete message option
CoreMessagingExperience.MESSAGEDELIVERYANDREADRECEIPTSreceiptsVisibilityShows/hides read receipts
CoreMessagingExperience.QUOTEDREPLIESisSwipeToReplyEnabled, replyOptionVisibilityEnables swipe-to-reply and reply option
DeeperUserEngagement.REACTIONSmessageReactionOptionVisibilityShows/hides reaction option
DeeperUserEngagement.MESSAGETRANSLATIONtranslateMessageOptionVisibilityShows/hides translate option
AiUserCopilot.CONVERSATIONSTARTERisEnableConversationStarterEnables AI conversation starters
AiUserCopilot.SMARTREPLYisEnableSmartRepliesEnables AI smart replies
PrivateMessagingWithinGroups.SENDPRIVATEMESSAGETOGROUPMEMBERSmessagePrivatelyOptionVisibilityShows/hides message privately option

MessageComposer

The applySettingsToMessageComposer method configures attachment options, typing indicators, mentions, and more.
Settings Applied:
SettingPropertyDescription
CoreMessagingExperience.TYPINGINDICATORdisableTypingEvents()Enables/disables typing indicators
CoreMessagingExperience.PHOTOSSHARINGcameraAttachmentOptionVisibility, imageAttachmentOptionVisibilityShows/hides photo attachments
CoreMessagingExperience.VIDEOSHARINGvideoAttachmentOptionVisibilityShows/hides video attachments
CoreMessagingExperience.AUDIOSHARINGaudioAttachmentOptionVisibilityShows/hides audio attachments
CoreMessagingExperience.FILESHARINGfileAttachmentOptionVisibilityShows/hides file attachments
DeeperUserEngagement.MENTIONSisDisableMentionsEnables/disables @mentions
DeeperUserEngagement.MENTIONALLsetDisableMentionAll()Enables/disables @all mentions
DeeperUserEngagement.POLLSpollAttachmentOptionVisibilityShows/hides polls option
DeeperUserEngagement.COLLABORATIVEWHITEBOARDcollaborativeWhiteboardOptionVisibilityShows/hides whiteboard option
DeeperUserEngagement.COLLABORATIVEDOCUMENTcollaborativeDocumentOptionVisibilityShows/hides document option
DeeperUserEngagement.VOICENOTESvoiceNoteButtonVisibilityShows/hides voice notes button
DeeperUserEngagement.STICKERSstickersButtonVisibilityShows/hides stickers button

Users

The applySettingsToUsers method configures user list display options.
Settings Applied:
SettingPropertyDescription
CoreMessagingExperience.USERANDFRIENDSPRESENCEuserStatusVisibilityShows/hides online status indicator

CallLogs

The applySettingsToCallLogs method configures call log display and call buttons.
Settings Applied:
SettingPropertyDescription
VoiceAndVideoCalling.ONEONONEVIDEOCALLINGitemVideoCallIconShows/hides video call icon
VoiceAndVideoCalling.ONEONONEVOICECALLINGitemIncomingCallIconShows/hides voice call icon

GroupMembers

The applySettingToGroupMembers method configures moderator controls and member display options.
Settings Applied:
SettingPropertyDescription
ModeratorControls.KICKUSERSkickMemberOptionVisibilityShows/hides kick member option
ModeratorControls.BANUSERSbanMemberOptionVisibilityShows/hides ban member option
ModeratorControls.PROMOTEDEMOTEMEMBERSscopeChangeOptionVisibilityShows/hides promote/demote option
CoreMessagingExperience.USERANDFRIENDSPRESENCEuserStatusVisibilityShows/hides online status indicator

Functional Changes via CometChatBuilderSettings

For functional changes (enabling/disabling features), you can directly access the CometChatBuilderSettings object:

Modifying Feature Flags at Runtime

You can modify feature flags at runtime by directly setting the values:
Runtime changes to CometChatBuilderSettings are not persisted. They will reset to the original values when the app restarts.

UI/Theme Changes via themes.xml

For visual customizations (colors, fonts, spacing), modify the themes.xml file in your res/values directory.

Customizing Colors

themes.xml

Customizing Typography

themes.xml

Pre-built Font Themes

The Builder includes pre-built font themes you can use:
themes.xml

Customizing Component Styles

You can customize individual component styles by overriding their style attributes:
themes.xml

Next Steps

UI Kit Builder Settings

Understand all available feature toggles and configuration options.

Components Overview

Explore all available UI components and their customization options.

Theming

Deep dive into colors, typography, and advanced styling.

Directory Structure

Understand how the exported code is organized.