In this documentation, we'll guide you through the process of installation, enabling you to enhance your Flutter app with Flutter core sdk plugin swiftly and efficiently.Let's get started on your journey to creating seamless communication experiences with Flutter plugin!
In Flutter Plugin , you'll find a range of powerful features designed to enhance your application's communication and collaboration capabilities. These features include:
-
Voice and Video Calling:Enjoy high-quality, real-time audio and video calls with your contacts.
-
Participant Panel: Manage and monitor participants in real-time meetings or video calls for a seamless user experience.
-
Screen Sharing and Whiteboard Sharing: Empower collaboration by sharing your screen or using a virtual whiteboard during meetings or video conferences.
-
Group Conversation: Easily engage in text-based conversations with multiple participants in one chat group.
-
Inspect Call Health: Monitor the quality and performance of your audio and video calls to ensure a seamless communication experience.
Before you begin, ensure you have met the following requirements:
- You need to add the necessary configurations to your project's
pubspec.yaml
file:
coresdk_plugin:
git:
url: https://github.com/JioMeet/JioMeetCoreTemplateSDK_Flutter.git
ref: 0.0.17
- Add
credentials.properties
File to Your Project Root
To securely add your GitHub credentials, follow these steps to create a credentials.properties
file in the root directory of your project:
- Go to Settings > Developer Settings > Personal Access Tokens > Tokens (classic) > Generate new token.
- Select the following scope:
read:packages
- Generate the token and copy it immediately. You cannot view the token again once you leave the page. If lost, you will need to generate a new one.
-
In the root directory of your project, create a file named
credentials.properties
. -
Add the following content to the file, replacing placeholders with your actual GitHub credentials:
username=your-github-username password=your-personal-access-token
Before getting started with this example app, please ensure you have the following software installed on your machine:
- Xcode 14.2 or later.
- Swift 5.0 or later.
- An iOS device or emulator running iOS 13.0 or later.
Please add below permissions keys to your Info.plist
file with proper description.
<key>NSCameraUsageDescription</key>
<string>Allow access to camera for meetings</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow access to mic for meetings</string>
Please enable Background Modes
in your project Signing & Capibilities
tab. After enabling please check box with option Audio, Airplay, and Pictures in Pictures
. If you don't enables this setting, your mic will be muted when your app goes to background.
You need to first register on Jiomeet platform.Click here to sign up
Create a new app. Please follow the steps provided in the Documentation guide to create apps before you proceed.
Use the create meeting api to get your room id and password
Here CoresdkPlugin is a main dart class to act as bridge between core tamplet sdk and FLutter client project. With _coresdkPlugin instance we can call the core tamplet SDK methods.
final _jioCoreSdkPlugin = JioCoreSdkPlugin();
try {
var meetingDetails = MeetingDetails(meetingId: "meeting_Id", meetingPin: "meeting_pin", displayName: "display_name", isInitialAudioOn: false, isInitialVideoOn: false, hostToken: "host_token");
await _coresdkPlugin.launchMeetingCoreTemplateUi(meetingDetails);
} on PlatformException {
_meetingStatus = "error while joining";
}
1 - Register methodchannel
static const platform = MethodChannel('coresdk_plugin');
2
@override
void initState() {
super.initState();
coreSdkPluginCallbacks();
}
Future<void> coreSdkPluginCallbacks() async {
platform.setMethodCallHandler((call) async {
if (call.method == "meetingEnded") {
setState(() {
_meetingStatus = "Ended";
});
}
});
}
config features, like we have to enable/disable the feature of switch camera, screen share, participant panel
we can find all feature flags in SetCoreSdkConfig class.
var config = SetCoreSdkConfig(enableFlipCamera: true);
await _coresdkPlugin.setConfig(config);
import 'dart:async';
import 'package:coresdk_plugin/coresdk_plugin.dart';
import 'package:coresdk_plugin/meeting_details.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _coresdkPlugin = JioCoreSdkPlugin();
static const platform = MethodChannel('coresdk_plugin');
String _meetingStatus = 'Not started';
@override
void initState() {
super.initState();
coreSdkPluginCallbacks();
}
Future<void> coreSdkPluginCallbacks() async {
platform.setMethodCallHandler((call) async {
if (call.method == "meetingEnded") {
setState(() {
_meetingStatus = "Ended";
});
}
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('meeting Status: $_meetingStatus\n'),
TextButton(
onPressed: () async {
try {
var meetingDetails = MeetingDetails(meetingId: "meeting_id", meetingPin: "meeting_pin", displayName: "display_name", isInitialAudioOn: false, isInitialVideoOn: false, hostToken: "hostToken");
await _coresdkPlugin.launchMeetingCoreTemplateUi(meetingDetails);
} on PlatformException {
_meetingStatus = "error while joining";
}
},
child: const Text('Join Meeting'),
),
],
),
),
),
);
}
}
- Facing any issues while integrating or installing the JioMeet Template UI Kit please connect with us via real time support present in [email protected] or https://jiomeetpro.jio.com/contact-us