Faster Integration with UI KitsIf you’re using CometChat UI Kits, voice and video calling can be quickly integrated:
- Incoming & outgoing call screens
- Call buttons with one-tap calling
- Call logs with history
Add the CometChat Dependency
Step 1: Add the Package
Add thecometchat_calls_sdk dependency to your pubspec.yaml file:
Ringing calls? Incoming calls ring through
cometchat_voip. Add it as well and follow Push Ringing. The Calls SDK alone can start, join and end calls, but it can’t ring a phone that isn’t running your app.Upgrading from 5.0.x? 5.1.0 changes the build requirements on both platforms (below) and has a few breaking changes. See Migration Guide.
Step 2: Install Dependencies
Run the following command to install the package:Add Permissions
Android
Add the required permissions to yourandroid/app/src/main/AndroidManifest.xml:
compileSdk 36 and Android Gradle Plugin 8.9.1 or later: the SDK depends on connectivity_plus 7 and androidx.core 1.18, which require them. Flutter 3.44’s default compileSdk is 36.
To keep a call running in the background, declare the SDK’s ongoing call service in your app’s manifest. See Background Handling.
For Android 6.0 (API level 23) and above, you must request camera and microphone permissions at runtime before starting or joining a call. When a call is answered from
cometchat_voip’s ring, it asks for them on Answer.iOS
Add the following usage descriptions to yourios/Runner/Info.plist:
iOS requires usage description strings for camera and microphone access. Without these entries, the app will crash when attempting to access the camera or microphone.
- Set the iOS deployment target to 15.1 on the Runner target in Xcode (General → Minimum Deployments).
- Build with Xcode 26.1.1 or later:
connectivity_plus7.1 and later, which the SDK depends on, use the iOS 26 SDK. An app that must build with Xcode 16 can holdconnectivity_plusat 7.0.x in its ownpubspec.yaml(connectivity_plus: '>=7.0.0 <7.1.0').
Initialize CometChat Calls
Theinit() method initializes the SDK with your app credentials. Call this method once when your application starts, typically in your main() function or root widget’s initState().
CallAppSettingBuilder
TheCallAppSettingBuilder class configures the SDK initialization:
Check Initialization Status
You can verify if the SDK has been initialized using theisInitialized getter: