Skip to content

iambinodstha/react-native-zoom-call-example

Repository files navigation

zoom call App using react native

This application cover Zoom SDK integration for IOS and Android with features of Joining meeting and Starting meeting

Demo screenshots

screenshot1

screenshot2

screenshot3

screenshot4

Build an zoom app

Steps:

  1. create a zoom app Zoom Marketplace
  2. Generate app credentials for sdk and api

How to install

  1. clone this react project by running below command in git terminal: git clone https://github.com/iambinodstha/react-native-zoom-call-example.git

  2. after Step 1. goto project directory: cd react-native-zoom-call-example

  3. install dependencies: npm install or yarn install

Android installation

  1. Add repository to android/build.gradle:
allprojects {
    repositories {
        flatDir {
            dirs "$rootDir/../node_modules/react-native-zoom-us/android/libs"
        }
    }
}   
  1. Set minSdkVersion to 21
buildscript {
    ext {
        minSdkVersion = 21
    }
}
  1. npx react-native run-android or react-native run-android

IOS installation

  1. pod install cd ios && pod install
  2. build npx react-native run-ios or react-native run-ios

Usage

  1. setup configuration credentials: source/helper/config.js
export const config = {
    apiKey: '', //API key
    apiSecret: '', //API secret
    sdkKey: '', //SDK key
    sdkSecret: '' //SDK secret
}
  1. Initialization
   async function initializeZoom() {
        try {
            await ZoomUs.initialize({
                clientKey: config.sdkKey, // SDK key from zoom app
                clientSecret: config.sdkSecret, // SDK secret from zoom app
                domain: 'zoom.us'
            })
        } catch(err) {
            Alert.alert('Error', err);
        }
    }
  1. Join Meeting
async function joinMeeting() {
        try {
            await ZoomUs.joinMeeting({
                userName: name, // name
                meetingNumber: meetingId, //meeting id
                noAudio: audio, // audio configuration
                noVideo: video // video configuration
            })
        } catch (err) {
            Alert.alert('Error', err);
        }
    }
  1. Join Meeting
async function startMeeting() {
        try {
            setLoading(true);
            let jwtToken = await generateToken(); //generate JWT token
            let userResult = await getUserID(email, jwtToken);
            const { id: userId, first_name, last_name } = userResult
            let zoomAccessToken = await createUserZAK(userId, jwtToken); // zoom access token
            let meetingId = await createMeeting(userId, jwtToken);
            setLoading(false);

            await ZoomUs.startMeeting({
                userName: `${first_name} ${last_name}`, // Full Name
                meetingNumber: meetingId.id, // meeting id from api
                userId: userId, // user id from api
                zoomAccessToken: zoomAccessToken.token, // zoom access token from api
            })
        } catch (err) {
            Alert.alert('Error', err)
        }
    }

Packages used

  1. react-native-zoom-us
  2. react-native-switch
  3. react-native-pure-jwt

About

a simple project integrating zoom call using react native for creating new meeting and joining meeting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published