This application cover Zoom SDK integration for IOS and Android with features of Joining meeting and Starting meeting
- create a zoom app Zoom Marketplace
- Generate app credentials for sdk and api
-
clone this react project by running below command in git terminal:
git clone https://github.com/iambinodstha/react-native-zoom-call-example.git
-
after Step 1. goto project directory:
cd react-native-zoom-call-example
-
install dependencies:
npm install
oryarn install
- Add repository to android/build.gradle:
allprojects {
repositories {
flatDir {
dirs "$rootDir/../node_modules/react-native-zoom-us/android/libs"
}
}
}
- Set minSdkVersion to 21
buildscript {
ext {
minSdkVersion = 21
}
}
npx react-native run-android
orreact-native run-android
- pod install
cd ios && pod install
- build
npx react-native run-ios
orreact-native run-ios
- setup configuration credentials:
source/helper/config.js
export const config = {
apiKey: '', //API key
apiSecret: '', //API secret
sdkKey: '', //SDK key
sdkSecret: '' //SDK secret
}
- 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);
}
}
- 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);
}
}
- 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)
}
}