Skip to main content
This guide walks you through integrating the CometChat Calls SDK into an Ionic application. By the end, you’ll have a working video call implementation with proper authentication and lifecycle handling. This guide covers Ionic with Angular, React, and Vue.
For native mobile features like CallKit, VoIP push notifications, and background handling, consider using the native iOS or Android SDKs.

Prerequisites

Before you begin, ensure you have:
  • A CometChat account with an app created (Sign up)
  • Your App ID, Region, and API Key from the CometChat Dashboard
  • An Ionic project (Angular, React, or Vue)
  • Node.js 16+ installed
  • Ionic CLI installed (npm install -g @ionic/cli)

Step 1: Install the SDK

Install the CometChat Calls SDK package:

Ionic Angular

Step 2: Create the Service

Create a service that handles SDK initialization, authentication, and call operations. The service waits for the Ionic platform to be ready before initializing:

Step 3: Initialize in App Component

Initialize the SDK and login when the app starts:

Step 4: Create the Call Page

Create a call page component that handles joining sessions, media controls, and cleanup:

Step 5: Create the Call Page Template

Create the HTML template for the call page with video container and controls:

Step 6: Create the Home Page

Create a home page where users can enter a session ID and join a call:

Ionic React

Step 2: Create the Provider

Create a context provider that handles SDK initialization and authentication:

Step 3: Wrap Your App

Add the provider to your app’s root component:

Step 4: Create the Call Page

Create a call page that handles joining sessions, media controls, and cleanup:

Step 5: Create the Home Page

Create a home page where users can enter a session ID and join a call:

Ionic Vue

Step 2: Create the Composable

Create a composable that handles SDK initialization and authentication:

Step 3: Initialize in App Component

Initialize the SDK and login when the app starts:

Step 4: Create the Call Page

Create a call page that handles joining sessions, media controls, and cleanup:

Step 5: Create the Home Page

Create a home page where users can enter a session ID and join a call:

Step 6: Configure Routes

Set up the router with the home and call pages:
For more detailed information on specific topics covered in this guide, refer to the main documentation: