Video Call Feature with ZegoCloud



 Video Call Feature with ZegoCloud

There are many platforms that offer video calling features but based ZegoCloud stands out from the rest. It provides a variety of SDKs that help improve the performance of both mobile apps and websites.

Some of the powerful services ZegoCloud offers include:

  • 📹 Video Call

  • 📞 Voice Call

  • 📺 Live Streaming

  • 💬 In-app Chat

  • 📀 Cloud Recording API

  • AI Effects

  • 🧑‍🏫 Super Board

  • 🧠 Digital Human

Among all these services, in this article, we will focus on adding the Video Call functionality to a Flutter application using ZegoCloud's SDK.

Let’s walk through the step-by-step process to integrate video calls into our app easily and quickly.

Here are the steps to be followed:

Step 1: Set Up ZegoCloud account

Go to ZegoCloud and sign up. You’ll get a free trial, so no need to pay anything at beginning.

Step 2:  Create a new project
  Follow the steps as shown in image below
 a.  Click on Create your First Project Section


b.  After that you will be directed to this section,where we have multiple use case as per our need.
We will continue by selecting on Voice & Video Call  card


c. After this,provide suitable project name that suits to you.



d. Now we have 2 ways to get started either by UI Kits and Custom Sdks


e. We will continue by selecting UI Kits
f. After this the platform is created ,now select the framework as per the requirements 
We will select Flutter Framework


g. Now, click on Save  & Start to Integrate button

3. Now the project is created and you will obtain AppID & App Sign key.
        Keep this both key safe ,we will need this key later on.

4. Flutter Application Setup
a. Run this command
This command heps to create a new flutter project that specified that it support to only android and ios  with name zego_flutter



b. Edit android/app/build.gradle
Add these dependencies

dependencies {
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
&
Make these changes
minSdkVersion 21
compileSdkVersion 33
targetSdkVersion 33

c. Edit zego_flutter/app/src/main/AndroidManifest.xml
Add this permission so that the app will work

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE"/>

<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<!--for bring app to foreground from background in Android 10 -->
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

d. Add package to pubspec.yaml file
Add package by running this command in terminal
flutter pub add zego_uikit_prebuilt_call

e. Made changes in files
 In  main.dart

In call_page.dart
Add the  appId and appSign key in here




 In home_page.dart
  User enter callID and can join the call


In conclusion,with this steps followed you can add the feature of video call in your application as per your requirements.



Comments