> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SessionSettingsBuilder

> CometChat Calling SDK v5 - SessionSettingsBuilder for Android

The `SessionSettingsBuilder` is a powerful configuration tool that allows you to customize every aspect of your call session before participants join. From controlling the initial audio/video state to customizing the UI layout and hiding specific controls, this builder gives you complete control over the call experience.

Proper session configuration is crucial for creating a seamless user experience tailored to your application's specific needs.

<Note>
  These are pre-session configurations that must be set before joining a call. Once configured, pass the `SessionSettings` object to the `joinSession()` method. Settings cannot be changed after the session has started, though many features can be controlled dynamically during the call using call actions.
</Note>

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val sessionSettings = CometChatCalls.SessionSettingsBuilder()
        .setTitle("Team Meeting")
        .setDisplayName("John Doe")
        .setType(SessionType.VIDEO)
        .setLayout(LayoutType.TILE)
        .startAudioMuted(false)
        .startVideoPaused(false)
        .build()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    SessionSettings sessionSettings = new CometChatCalls.SessionSettingsBuilder()
        .setTitle("Team Meeting")
        .setDisplayName("John Doe")
        .setType(SessionType.VIDEO)
        .setLayout(LayoutType.TILE)
        .startAudioMuted(false)
        .startVideoPaused(false)
        .build();
    ```
  </Tab>
</Tabs>

## Session Settings

### Title

**Method:** `setTitle(String)`

Sets the title that appears in the call header. This helps participants identify the purpose or name of the call session. The title is displayed prominently at the top of the call interface.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setTitle("Team Meeting")
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setTitle("Team Meeting")
    ```
  </Tab>
</Tabs>

| Parameter | Type   | Default |
| --------- | ------ | ------- |
| `title`   | String | null    |

### Display Name

**Method:** `setDisplayName(String)`

Sets the display name that will be shown to other participants in the call. This name appears on your video tile and in the participant list, helping others identify you during the session.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setDisplayName("John Doe")
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setDisplayName("John Doe")
    ```
  </Tab>
</Tabs>

| Parameter     | Type   | Default |
| ------------- | ------ | ------- |
| `displayName` | String | null    |

### Session Type

**Method:** `setType(SessionType)`

Defines the type of call session. Choose `VIDEO` for video calls with camera enabled, or `AUDIO` for audio-only calls. This setting determines whether video streaming is enabled by default.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setType(SessionType.VIDEO)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setType(SessionType.VIDEO)
    ```
  </Tab>
</Tabs>

| Parameter | Type        | Default |
| --------- | ----------- | ------- |
| `type`    | SessionType | VIDEO   |

<Accordion title="SessionType Values">
  | Value   | Description                    |
  | ------- | ------------------------------ |
  | `VIDEO` | Video call with camera enabled |
  | `AUDIO` | Audio-only call                |
</Accordion>

### Layout Mode

**Method:** `setLayout(LayoutType)`

Sets the initial layout mode for displaying participants. `TILE` shows all participants in a grid, `SPOTLIGHT` focuses on the active speaker with others in a sidebar, and `SIDEBAR` displays the main speaker with participants in a side panel.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setLayout(LayoutType.TILE)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setLayout(LayoutType.TILE)
    ```
  </Tab>
</Tabs>

| Parameter | Type       | Default |
| --------- | ---------- | ------- |
| `layout`  | LayoutType | TILE    |

<Accordion title="LayoutType Values">
  | Value       | Description                                    |
  | ----------- | ---------------------------------------------- |
  | `TILE`      | Grid layout showing all participants equally   |
  | `SPOTLIGHT` | Focus on active speaker with others in sidebar |
  | `SIDEBAR`   | Main speaker with participants in a sidebar    |
</Accordion>

### Idle Timeout Period

**Method:** `setIdleTimeoutPeriod(int)`

Configures the timeout duration in seconds before automatically ending the session when you're the only participant. This prevents sessions from running indefinitely when others have left.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setIdleTimeoutPeriod(300)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setIdleTimeoutPeriod(300)
    ```
  </Tab>
</Tabs>

| Parameter | Type | Default |
| --------- | ---- | ------- |
| `seconds` | int  | 300     |

### Start Audio Muted

**Method:** `startAudioMuted(boolean)`

Determines whether the microphone is muted when joining the session. Set to `true` to join with audio muted, requiring users to manually unmute. Useful for large meetings to prevent background noise.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .startAudioMuted(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .startAudioMuted(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `muted`   | boolean | false   |

### Start Video Paused

**Method:** `startVideoPaused(boolean)`

Controls whether the camera is turned off when joining the session. Set to `true` to join with video disabled, allowing users to enable it when ready. Helpful for privacy or bandwidth considerations.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .startVideoPaused(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .startVideoPaused(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `paused`  | boolean | false   |

### Audio Mode

**Method:** `setAudioMode(AudioMode)`

Sets the initial audio output device for the call. Options include `SPEAKER` for loudspeaker, `EARPIECE` for phone earpiece, `BLUETOOTH` for connected Bluetooth devices, or `HEADPHONES` for wired headphones.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setAudioMode(AudioMode.SPEAKER)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setAudioMode(AudioMode.SPEAKER)
    ```
  </Tab>
</Tabs>

| Parameter   | Type      | Default |
| ----------- | --------- | ------- |
| `audioMode` | AudioMode | SPEAKER |

<Accordion title="AudioMode Values">
  | Value        | Description                |
  | ------------ | -------------------------- |
  | `SPEAKER`    | Device loudspeaker         |
  | `EARPIECE`   | Phone earpiece             |
  | `BLUETOOTH`  | Connected Bluetooth device |
  | `HEADPHONES` | Wired headphones           |
</Accordion>

### Initial Camera Facing

**Method:** `setInitialCameraFacing(CameraFacing)`

Specifies which camera to use when starting the session. Choose `FRONT` for the front-facing camera (selfie mode) or `BACK` for the rear camera. Users can switch cameras during the call.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .setInitialCameraFacing(CameraFacing.FRONT)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .setInitialCameraFacing(CameraFacing.FRONT)
    ```
  </Tab>
</Tabs>

| Parameter      | Type         | Default |
| -------------- | ------------ | ------- |
| `cameraFacing` | CameraFacing | FRONT   |

<Accordion title="CameraFacing Values">
  | Value   | Description         |
  | ------- | ------------------- |
  | `FRONT` | Front-facing camera |
  | `BACK`  | Rear camera         |
</Accordion>

### Low Bandwidth Mode

**Method:** `enableLowBandwidthMode(boolean)`

Enables optimization for poor network conditions. When enabled, the SDK reduces video quality and adjusts streaming parameters to maintain call stability on slow or unstable connections.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .enableLowBandwidthMode(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .enableLowBandwidthMode(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `enabled` | boolean | false   |

### Auto Start Recording

**Method:** `enableAutoStartRecording(boolean)`

Automatically starts recording the session as soon as it begins. When enabled, recording starts without manual intervention, ensuring the entire session is captured from the start.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .enableAutoStartRecording(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .enableAutoStartRecording(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `enabled` | boolean | false   |

### Hide Control Panel

**Method:** `hideControlPanel(boolean)`

Hides the bottom control bar that contains call action buttons. Set to `true` to remove the control panel entirely, useful for custom UI implementations or view-only modes.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideControlPanel(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideControlPanel(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Header Panel

**Method:** `hideHeaderPanel(boolean)`

Hides the top header bar that displays the call title and session information. Set to `true` to maximize the video viewing area or implement a custom header.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideHeaderPanel(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideHeaderPanel(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Session Timer

**Method:** `hideSessionTimer(boolean)`

Hides the session duration timer that shows how long the call has been active. Set to `true` to remove the timer display from the interface.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideSessionTimer(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideSessionTimer(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Leave Session Button

**Method:** `hideLeaveSessionButton(boolean)`

Hides the button that allows users to leave or end the call. Set to `true` to remove this button, requiring an alternative method to exit the session.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideLeaveSessionButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideLeaveSessionButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Toggle Audio Button

**Method:** `hideToggleAudioButton(boolean)`

Hides the microphone mute/unmute button from the control panel. Set to `true` to remove audio controls, useful when audio control should be managed programmatically.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideToggleAudioButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideToggleAudioButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Toggle Video Button

**Method:** `hideToggleVideoButton(boolean)`

Hides the camera on/off button from the control panel. Set to `true` to remove video controls, useful for audio-only calls or custom video control implementations.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideToggleVideoButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideToggleVideoButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Switch Camera Button

**Method:** `hideSwitchCameraButton(boolean)`

Hides the button that allows switching between front and rear cameras. Set to `true` to remove this control, useful for devices with single cameras or fixed camera requirements.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideSwitchCameraButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideSwitchCameraButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Recording Button

**Method:** `hideRecordingButton(boolean)`

Hides the recording start/stop button from the control panel. Set to `false` to show the recording button, allowing users to manually control session recording.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideRecordingButton(false)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideRecordingButton(false)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | true    |

### Hide Screen Sharing Button

**Method:** `hideScreenSharingButton(boolean)`

Hides the screen sharing button from the control panel. Set to `true` to remove screen sharing controls, useful when screen sharing is not needed or managed separately.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideScreenSharingButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideScreenSharingButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Audio Mode Button

**Method:** `hideAudioModeButton(boolean)`

Hides the button that toggles between speaker, earpiece, and other audio output modes. Set to `true` to remove audio mode controls from the interface.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideAudioModeButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideAudioModeButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Raise Hand Button

**Method:** `hideRaiseHandButton(boolean)`

Hides the raise hand button that participants use to signal they want to speak. Set to `true` to remove this feature from the interface.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideRaiseHandButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideRaiseHandButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Share Invite Button

**Method:** `hideShareInviteButton(boolean)`

Hides the button that allows sharing session invite links with others. Set to `false` to show the invite button, enabling easy participant invitation.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideShareInviteButton(false)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideShareInviteButton(false)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | true    |

### Hide Participant List Button

**Method:** `hideParticipantListButton(boolean)`

Hides the button that opens the participant list view. Set to `true` to remove access to the participant list, useful for simplified interfaces.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideParticipantListButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideParticipantListButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Change Layout Button

**Method:** `hideChangeLayoutButton(boolean)`

Hides the button that allows switching between different layout modes (tile, spotlight, sidebar). Set to `true` to lock the layout to the initial setting.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideChangeLayoutButton(true)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideChangeLayoutButton(true)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | false   |

### Hide Chat Button

**Method:** `hideChatButton(boolean)`

Hides the button that opens the in-call chat interface. Set to `false` to show the chat button, enabling text communication during calls.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    .hideChatButton(false)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    .hideChatButton(false)
    ```
  </Tab>
</Tabs>

| Parameter | Type    | Default |
| --------- | ------- | ------- |
| `hide`    | boolean | true    |

<Accordion title="Enum Values">
  | Enum           | Value        | Description                                    |
  | -------------- | ------------ | ---------------------------------------------- |
  | `SessionType`  | `VIDEO`      | Video call with camera enabled                 |
  |                | `AUDIO`      | Audio-only call                                |
  | `LayoutType`   | `TILE`       | Grid layout showing all participants equally   |
  |                | `SPOTLIGHT`  | Focus on active speaker with others in sidebar |
  |                | `SIDEBAR`    | Main speaker with participants in a sidebar    |
  | `AudioMode`    | `SPEAKER`    | Device loudspeaker                             |
  |                | `EARPIECE`   | Phone earpiece                                 |
  |                | `BLUETOOTH`  | Connected Bluetooth device                     |
  |                | `HEADPHONES` | Wired headphones                               |
  | `CameraFacing` | `FRONT`      | Front-facing camera                            |
  |                | `BACK`       | Rear camera                                    |
</Accordion>
