Skip to main content
Add real-time messaging to your call experience using CometChat UI Kit. This allows participants to send text messages, share files, and communicate via chat while on a call.

Overview

In-call chat creates a group conversation linked to the call session. When participants tap the chat button, they can:
  • Send and receive text messages
  • Share images, files, and media
  • See message history from the current call
  • Get unread message notifications via badge count

Prerequisites

  • CometChat Calls SDK integrated (Setup)
  • CometChat Chat SDK integrated (Chat SDK)
  • CometChat UI Kit integrated (UI Kit)
The Chat SDK and UI Kit are separate from the Calls SDK. You’ll need to add both dependencies to your project.

Step 1: Add UI Kit Dependency

Add the CometChat UI Kit to your build.gradle:

Step 2: Enable Chat Button

Configure session settings to show the chat button:

Step 3: Create Chat Group

Create or join a CometChat group using the session ID as the group GUID. This links the chat to the specific call session.

Step 4: Handle Chat Button Click

Listen for the chat button click and open your chat activity:

Step 5: Track Unread Messages

Listen for incoming messages and update the badge count on the chat button:

Step 6: Create Chat Activity

Create a chat activity using UI Kit components:

Complete Example

Here’s the complete CallActivity with in-call chat integration: