Skip to main content
Quick Reference for AI Agents & Developers
CometChat’s Calls feature offers advanced functionality for seamlessly integrating one-on-one and group audio/video calling into your application. This document provides a technical overview of how these features are implemented using the React Native UI Kit.
Calling features require installing @cometchat/calls-sdk-react-native separately. The UI Kit auto-detects it and enables call UI components.

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 the Getting Started guide. 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:
Once the dependency is added, the React Native UI Kit will automatically detect it and enable calling features. Your application will now support both audio and video calls, and the CallButtons component will appear within the MessageHeader component.

Add Necessary Permissions

Android

Open AndroidManifest.xml located at android/app/src/main in your React Native project and add the following permissions:

iOS

Open Info.plist located at ios/{appname} in your React Native project and add the following entries:

Setup Minimum Android and iOS Versions

For Android, open the app-level build.gradle and set minSdkVersion to 24, and both targetSdkVersion and compileSdkVersion to 33.
For iOS, open the .xcworkspace in Xcode and set IPHONEOS_DEPLOYMENT_TARGET to 12.0. Alternatively, you can specify it in the post_install hook of the Podfile:
Apple Silicon (M1/M2/M3) users: Excluding arm64 from the simulator build prevents the app from running natively on Apple Silicon Macs. If you are developing on an Apple Silicon Mac, consider excluding only i386 instead of arm64 i386 to enable native simulator builds.

Add the Call Listeners

In addition to CallButtons, the Calls UI Kit offers fully functional UI components for handling Incoming, Outgoing, and Ongoing calls. To receive call events in your desired component or screen, you must register a call listener using the addCallListener() method. The onIncomingCallReceived() event is triggered whenever an incoming call is received.

Features

Incoming Call

The Incoming Call component of the CometChat UI Kit provides the functionality that lets users receive real-time audio and video calls in the app. When a call is made to a user, the Incoming Call component triggers and displays a call screen. This call screen typically displays the caller information and provides the user with options to either accept or reject the incoming call.

Outgoing Call

The Outgoing Call component of the CometChat UI Kit is designed to manage the outgoing call process within your application. When a user initiates an audio or video call to another user or group, this component displays an outgoing call screen, showcasing information about the recipient and the call status. The Outgoing Call component automatically transitions into the ongoing call screen once the receiver accepts the call. This ensures a smooth flow from initiating the call to engaging in a conversation, without any additional steps required from the user.

Call Logs

The Call Logs component provides records of call events such as who called whom, the time of the call, and the duration. This information can be fetched from the CometChat server and displayed in a structured format for users to view their past call activities.

Next Steps

Incoming Call

Handle incoming audio and video calls

Outgoing Call

Manage outgoing call screens and transitions

Call Buttons

Add call action buttons to your chat header

Call Logs

Display call history and past call activities