How to redirect a flutter app to do any function in zoom meetings, like making a call or something similar?
Asked
Active
Viewed 1,193 times
0
-
Does this answer your question? [Can any one tell me how to open another app using flutter?](https://stackoverflow.com/questions/55771211/can-any-one-tell-me-how-to-open-another-app-using-flutter) – Rohan Thacker Jun 30 '21 at 05:51
1 Answers
0
By Using flutter_zoom_plugin: ^0.0.8 you can do it.
Note:- First of all you have to create your account on Zoom official website where You can create app key and secret key.
Code:-
import 'dart:async';
import 'dart:io';
import 'package:astro_school/Widgets/toastMessages.dart';
import 'package:flutter/material.dart';
import 'package:flutter_zoom_sdk/zoom_view.dart';
import 'package:flutter_zoom_sdk/zoom_options.dart';
import 'package:get/get.dart';
// ignore: must_be_immutable
class JoinClass extends StatelessWidget {
late ZoomOptions zoomOptions;
late ZoomMeetingOptions meetingOptions;
late Timer timer;
JoinClass({Key? key, meetingId, meetingPassword,username}) : super(key: key) {
this.zoomOptions = new ZoomOptions(
domain: "zoom.us",//here should be domain
appKey: "rRSxNxnhGnXHHLKGGm60TcKVOWzRAKJulvrP",//app key
appSecret: "FuX7v05IcyCLcLwu6pRxRl0bNHbii4LNdn4z",//secret key
);
this.meetingOptions = new ZoomMeetingOptions(
userId: username, //pass username for join meeting only
meetingId: meetingId, //pass meeting id for join meeting only
meetingPassword: meetingPassword, //pass meeting password for join meeting only
disableDialIn: "true",
disableDrive: "true",
disableInvite: "true",
disableShare: "true",
disableTitlebar: "false",
viewOptions: "true",
noAudio: "false",
noDisconnectAudio: "false"
);
}
bool _isMeetingEnded(String status) {
var result = false;
if (Platform.isAndroid)
result = status == "MEETING_STATUS_DISCONNECTING" || status == "MEETING_STATUS_FAILED";
else
result = status == "MEETING_STATUS_IDLE";
return result;
}
@override
Widget build(BuildContext context) {
// Use the Todo to create the UI.
return Scaffold(
appBar: AppBar(
backgroundColor:Color(0xff5D1445),
title: Text('Loading meeting '),
),
body: Padding(
padding: EdgeInsets.all(16.0),
child: ZoomView(onViewCreated: (controller) {
print("Created the view");
controller.initZoom(this.zoomOptions)
.then((results) {
print("initialised");
print(results);
if(results[0] == 0) {
controller.zoomStatusEvents.listen((status) {
// print("Meeting Status Stream: " + status[0] + " - " + status[1]);
if (_isMeetingEnded(status[0])) {
timer.cancel();
Get.toNamed('/home',);
}
});
print("listen on event channel");
controller.joinMeeting(this.meetingOptions)
.then((joinMeetingResult) {
timer = Timer.periodic(new Duration(seconds: 2), (timer) {
controller.meetingStatus(this.meetingOptions.meetingId!)
.then((status) {
// message('sdfdfd');
print("Meeting Status Polling: " + status[0] + " - " + status[1]);
});
});
});
}
}).catchError((error) {
message(error);
// print("Error");
print(error);
});
})
),
);
}
}

Chandan Pradhan
- 60
- 4
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 02 '21 at 22:10