Integrate JITSI Plugin In a Flutter Mobile Application
Posted By : Lucky Mehndiratta | 09-Mar-2021
It's always good to interact to the second person by face to face rather then text messages because its give us a real feel or create a good impact on second person. As the demand create in the market technologies evolve itself to give a more feature to people to come close by different different way. Mobile Applications is easy way to fulfill this demand and easy to integrate voice & video call feature which enable the user to intract with second person as real time interaction. There are so many technologies for mobile applications development but Flutter is a trending technology in the market. So, We will try to explore this voice & video calling feature with the help of JITSI MEET plugin in Flutter.
We enable this voice & video calling feature in Flutter Mobile Application by doing simple steps.
Step 1:
Add dependency in your pubspec.yml file
dependencies: jitsi_meet:
Step 2:
Run the command
flutter pub get
Step 3:
Configure Android & iOS
iOS
ensure platform version in podfile
platform :ios, '11.0'
ensure info.plist should have
<key>NSCameraUsageDescription</key>
<string>App needs access to your camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>App needs access to your microphone </string>
Android
Gradle
dependencies of build tools gradle to minimum 3.6.3
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3' Update this
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Set distribution gradle wrapper to minimum 5.6.4.
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip Update this
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="yourpackage.com"
xmlns:tools="http://schemas.android.com/tools"> Ensure this------------>
<application
tools:replace="android:label" Ensure this------------>
android:name="your.application.name"
android:label="My Application"
android:icon="@mipmap/ic_launcher">
...
</application>
...
</manifest>
Minimum SDK Version 21
Update your minimum sdk version to 21 in android/app/build.gradle
defaultConfig {
applicationId "xyz"
minSdkVersion 21 Ensure this------------>
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Proguard
In your Flutter project's android/app/build.gradle file, add proguard support
buildTypes {
release {
signingConfig signingConfigs.debug
// Add below 3 lines for proguard
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Step 4:
Join a Meeting
_joinMeeting() async {
try {
var options = JitsiMeetingOptions()
..room = "yourRoomNAme"
..serverURL = "yourServerName"
..subject = "xyz"
..userDisplayName = "xyz"
..userEmail = "[email protected]"
..audioOnly = true
..audioMuted = true
..videoMuted = true;
await JitsiMeet.joinMeeting(options);
} catch (error) {
debugPrint("error: $error");
}
}
Meeting Events:
await JitsiMeet.joinMeeting(options,
listener: JitsiMeetingListener(onConferenceWillJoin: ({message}) {
print(message);
}, onConferenceJoined: ({message}) {
print(message);
}, onConferenceTerminated: ({message}) {
print(message);
}));
Closing a Meeting:
JitsiMeet.closeMeeting();
ScreenShots:
After follow these simple steps your able to integrate the voice and video calling feature in your Flutter Mobile Application.
Official Links:
1 https://pub.dev/packages/jitsi_meet
2 https://github.com/gunschu/jitsi_meet
3 https://github.com/gunschu/jitsi_meet/issues
We are a mobile app development company that specializes in building feature-rich mobile applications for multiple platforms including Android and iOS. Our development team is skilled at using Flutter to build scalable mobile apps with cross-platform compatibility. Our 360-degree Flutter mobile app development services enable businesses to enhance their digital presence, expand their reach, and boost user engagement across multiple platforms. For more detail, contact us at [email protected].
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Lucky Mehndiratta
He worked on swift language, UI Design, Api. He is quick in his work and performs at his best.