Use call actions to create your own custom controls or trigger call functionality dynamically based on your use case. All actions are called on theDocumentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
CallSession singleton instance during an active call session.
Get CallSession Instance
TheCallSession is a singleton that manages the active call. All actions are accessed through this instance.
- Kotlin
- Java
Always check
isSessionActive() before calling actions to ensure there’s an active call.Actions
Mute Audio
Mutes your local microphone, stopping audio transmission to other participants.- Kotlin
- Java
Unmute Audio
Unmutes your local microphone, resuming audio transmission.- Kotlin
- Java
Set Audio Mode
Changes the audio output device during a call.- Kotlin
- Java
AudioMode Values
AudioMode Values
| Value | Description |
|---|---|
SPEAKER | Routes audio through device loudspeaker |
EARPIECE | Routes audio through phone earpiece |
BLUETOOTH | Routes audio through connected Bluetooth device |
HEADPHONES | Routes audio through wired headphones |
Pause Video
Turns off your local camera, stopping video transmission. Other participants see your avatar.- Kotlin
- Java
Resume Video
Turns on your local camera, resuming video transmission.- Kotlin
- Java
Switch Camera
Toggles between front and back cameras without interrupting the video stream.- Kotlin
- Java
Start Recording
Begins server-side recording of the call. All participants are notified.- Kotlin
- Java
Stop Recording
Stops the current recording. The recording is saved and accessible via the dashboard.- Kotlin
- Java
Mute Participant
Mutes a specific participant’s audio. This is a moderator action.- Kotlin
- Java
Pause Participant Video
Pauses a specific participant’s video. This is a moderator action.- Kotlin
- Java
Pin Participant
Pins a participant to keep them prominently displayed regardless of who is speaking.- Kotlin
- Java
Unpin Participant
Removes the pin, returning to automatic speaker highlighting.- Kotlin
- Java
Set Layout
Changes the call layout. Each participant can choose their own layout independently.- Kotlin
- Java
LayoutType Values
LayoutType Values
| Value | Description |
|---|---|
TILE | Grid layout with equally-sized tiles |
SPOTLIGHT | Large view for active speaker, small tiles for others |
SIDEBAR | Main speaker with participants in a sidebar |
Enable Picture In Picture Layout
Enables PiP mode, allowing the call to continue in a floating window.- Kotlin
- Java
Disable Picture In Picture Layout
Disables PiP mode, returning to full-screen call interface.- Kotlin
- Java
Set Chat Button Unread Count
Updates the badge count on the chat button. Pass 0 to hide the badge.- Kotlin
- Java
Is Session Active
Returnstrue if a call session is active, false otherwise.
- Kotlin
- Java
Leave Session
Ends your participation and disconnects gracefully. The call continues for other participants.- Kotlin
- Java
Raise Hand
Shows a hand-raised indicator to get attention from other participants.- Kotlin
- Java
Lower Hand
Removes the hand-raised indicator.- Kotlin
- Java
Participant Object Reference
Participant Object Reference
| Property | Type | Description |
|---|---|---|
uid | String | Unique identifier (CometChat user ID) |
name | String | Display name |
avatar | String | URL of avatar image |
pid | String | Participant ID for this call session |
role | String | Role in the call |
audioMuted | Boolean | Whether audio is muted |
videoPaused | Boolean | Whether video is paused |
isPinned | Boolean | Whether pinned in layout |
isPresenting | Boolean | Whether screen sharing |
raisedHandTimestamp | Long | Timestamp when hand was raised |