Skip to main content
Control the call layout and UI elements during an active session. These methods allow you to change the call layout, enable Picture-in-Picture mode, and update UI badges.

Prerequisites

Get CallSession Instance

Layout and UI methods are called on the CallSession singleton:

Set Layout

Change the call layout during an active session.

LayoutType Enum

When the layout changes, the onCallLayoutChanged(LayoutType) callback is triggered on your LayoutListener.

Picture-in-Picture Mode

Enable Picture-in-Picture (PiP) mode to allow users to continue viewing the call while using other apps.

Enable PiP

Disable PiP

Android PiP Integration

To fully support PiP on Android, you need to handle the activity lifecycle:
Don’t forget to add android:supportsPictureInPicture="true" to your activity in the AndroidManifest.xml.

Set Chat Button Unread Count

Update the badge count on the chat button to show unread messages.
The chat button must be visible (hideChatButton(false)) for the badge to appear.

Listen for Layout Events

Register a LayoutListener to receive callbacks when layout changes occur:

Initial Layout Settings

Configure the initial layout when joining a session:

Hide UI Elements

Control the visibility of various UI elements:

Button Click Listeners

Listen for UI button clicks to implement custom behavior:

Next Steps

Session Control

Leave session and hand raise controls

Layout Listener

Handle all layout events