Skip to main content
FieldValue
Packagecom.cometchat:chat-uikit-android + com.cometchat:calls-sdk-android (implementation 'com.cometchat:calls-sdk-android:4.+.+')
Required setupCometChatUIKit.init() then CometChatUIKit.login() — Calls SDK must also be installed
Call featuresIncoming Call, Outgoing Call, Call Logs, Call Buttons
Key componentsCometChatCallButtonsCall Buttons, CometChatIncomingCallIncoming Call, CometChatOutgoingCallOutgoing Call, CometChatCallLogsCall Logs
Auto-detectionUI Kit automatically detects the Calls SDK and enables call UI components
RelatedGetting Started, Core Features, Call Log Details Guide
CometChat’s Calls feature is an advanced functionality that allows you to seamlessly integrate one-on-one as well as group audio and video calling capabilities into your application. This document provides a technical overview of these features, as implemented in the Android UI Kit.

Integration

First, make sure that you’ve correctly integrated the UI Kit library into your project. If you haven’t done this yet or are facing difficulties, refer to our Getting Started guide. This guide will walk you through a step-by-step process of integrating our UI Kit into your Android project. Once you’ve successfully integrated the UI Kit, the next step is to add the CometChat Calls SDK to your project. This is necessary to enable the calling features in the UI Kit.

Step 1: Add Calls SDK Dependency

Add the following dependency to your build.gradle file:
dependencies {
  implementation 'com.cometchat:calls-sdk-android:4.+.+'
}
After adding this dependency, sync your project. The Android UI Kit will automatically detect the Calls SDK and activate the calling features.

Step 2: Verify Call Buttons Appear

Once the Calls SDK is integrated, you will see the CallButtons component automatically rendered in the MessageHeader component. This provides users with quick access to initiate audio and video calls.

Step 3: Add Call Listener for Incoming Calls

To receive incoming calls globally in your app, you will need to add a CallListener. This should be added before you initialize the CometChat UI Kit. We recommend creating a custom Application class and adding the call listener there. When an incoming call is received, you can display the CometChatIncomingCall component using the current activity context.
class BaseApplication : Application() {

    companion object {
        private val LISTENER_ID = "${BaseApplication::class.java.simpleName}${System.currentTimeMillis()}"
    }

    override fun onCreate() {
        super.onCreate()

        CometChat.addCallListener(LISTENER_ID, object : CometChat.CallListener {
            override fun onIncomingCallReceived(call: Call) {
                // Get the current activity context
                val currentActivity = getCurrentActivity() // Implement this method
                
                currentActivity?.let {
                    // Create and display the incoming call component
                    val incomingCallView = CometChatIncomingCall(it)
                    incomingCallView.call = call
                    incomingCallView.fitsSystemWindows = true
                    incomingCallView.onError = OnError { exception ->
                        // Handle errors
                    }
                    
                    // Display the component (e.g., as dialog or snackbar)
                }
            }

            override fun onOutgoingCallAccepted(call: Call) {
                // Handle outgoing call acceptance
            }

            override fun onOutgoingCallRejected(call: Call) {
                // Handle outgoing call rejection
            }

            override fun onIncomingCallCancelled(call: Call) {
                // Handle incoming call cancellation
            }
        })
    }
}

Call Components

The CometChat Android UI Kit provides four main components for implementing calling features in your app. Each component handles a specific part of the calling experience.

Call Buttons

The Call Buttons component provides users with quick access to initiate audio and video calls. This component is automatically rendered in the MessageHeader when the Calls SDK is integrated.
Learn more about Call Buttons →

Incoming Call

The Incoming Call component displays when a user receives an incoming call. It provides a full-screen interface showing caller information and call controls.
Learn more about Incoming Call →

Outgoing Call

The Outgoing Call component manages the outgoing call experience. It displays while waiting for the recipient to answer and automatically transitions to the active call screen once accepted.
Learn more about Outgoing Call →

Call Logs

The Call Logs component displays a history of all call activities, including missed, received, and dialed calls. Users can view call details and initiate new calls from the log.
Learn more about Call Logs →

Call Log Details

For detailed information about individual calls, including participants, join/leave history, and recordings, see the Call Log Details guide.