How to Utilize the Flutter Zoom Plugin

Dec 3, 2022 | Programming

The Flutter Zoom Plugin allows you to integrate Zoom’s functionalities seamlessly into your Flutter application. While this plugin is still evolving, it includes useful features for joining and starting Zoom meetings. In this guide, we will walk you through the installation process and provide examples to help you get started.

Features of the Flutter Zoom Plugin

  • Stream meeting status.
  • Join meetings effortlessly.
  • Start an existing meeting for a non-login user.
  • Upcoming: Start an existing meeting for a logged-in user.
  • Upcoming: Start an instant meeting for a logged-in user.

Installation Steps

To begin using the Flutter Zoom Plugin, follow these installation steps:

flutter_zoom_plugin:      
  git:        
    url: git:github.com/decodedhealth/flutter_zoom_plugin.git        
    ref: 0.0.8

Use the master branch for submissions to the Apple App Store:

flutter_zoom_plugin:      
  git:        
    url: git:github.com/decodedhealth/flutter_zoom_plugin.git        
    ref: master

Configuring iOS and Android

iOS Configuration

To enable camera and microphone access, add the following keys to your ios/Runner/Info.plist:

  • Privacy – Camera Usage Description
  • Privacy – Microphone Usage Description

For testing on the iOS simulator, you need the iOS Dev Zoom SDK:

flutter pub run flutter_zoom_plugin:unzip_zoom_sdk dev

To revert to the normal Zoom SDK, use:

flutter pub run flutter_zoom_plugin:unzip_zoom_sdk

Android Configuration

Change the minimum Android SDK version in your android/app/build.gradle file:

minSdkVersion 21

Add the zoom proguard content as per the instructions in this repository.

Code Examples

Now, let’s explore some code snippets to join and start meetings. Think of our Flutter application as a restaurant, and each Zoom meeting as a new dining experience. Here’s how you can prepare for your guests (the meeting participants) smoothly:

Joining a Meeting

The process of joining a meeting resembles preparing a table when guests arrive. Below is how you can utilize the Meeting Widget to join a Zoom meeting:

class MeetingWidget extends StatelessWidget {
    ZoomOptions zoomOptions;
    ZoomMeetingOptions meetingOptions;
    Timer timer;

    MeetingWidget(Key key, meetingId, meetingPassword) : super(key: key) {
        // Setting up the zoom credentials
        this.zoomOptions = new ZoomOptions(
            domain: "zoom.us",
            appKey: appKey, // Replace with your appKey
            appSecret: appSecret // Replace with your appSecret
        );

        // Setting Zoom meeting options
        this.meetingOptions = new ZoomMeetingOptions(
            userId: "example",
            meetingId: meetingId,
            meetingPassword: meetingPassword,
            disableDialIn: true,
            disableDrive: true,
            disableInvite: true,
            disableShare: true,
            noAudio: false,
            noDisconnectAudio: false
        );
    }

    // Build method follows...
}

In this example, we’re setting up the essentials for a smooth dining experience, preparing the table as per the guest’s preferences (joining the meeting settings).

Starting a Meeting for Non-login Users

Picture starting a meeting as opening the restaurant doors for guests who booked a table:

class StartMeetingWidget extends StatelessWidget {
    ZoomOptions zoomOptions;
    ZoomMeetingOptions meetingOptions;
    Timer timer;

    StartMeetingWidget(Key key, meetingId) : super(key: key) {
        this.zoomOptions = new ZoomOptions(
            domain: "zoom.us",
            appKey: appKey, // Replace with your appKey
            appSecret: appSecret // Replace with your appSecret
        );

        this.meetingOptions = new ZoomMeetingOptions(
            userId: zoom_user_id, // Replace with user email or ID
            displayName: "Example Display Name",
            meetingId: meetingId,
            zoomAccessToken: zak_token, // Replace with tokens obtained from Zoom API
            zoomToken: zoom_token, // Replace with tokens obtained from Zoom API
            disableDialIn: true,
            disableDrive: true,
            disableInvite: true,
            disableShare: true,
            noAudio: false,
            noDisconnectAudio: false
        );
    }

    // Build method follows...
}

In this snippet, we ensure all security measures are in place before letting our guests in (starting the meeting).

Troubleshooting Common Issues

If you encounter issues during implementation, consider the following troubleshooting ideas:

  • Make sure you have the correct app key and secret generated from the Zoom Marketplace.
  • If Crash occurs on iOS, verify the info.plist values are set correctly.
  • Check network permissions in your app settings to ensure functionalities are not blocked.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox