Description
I. project config details:
react: 17.0.2
react-native: 0.66.4
buildToolsVersion = 30.0.2
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = “21.4.7075529”
II. Steps we followed:
-
Downloaded android sdk and react native video sdk
-
Copied ‘mobilertc’ folder from android sdk into the android/mobilertc
-
Opened settings.gradle and included mobilertc in the project.
include ‘:mobilertc’ -
In app/build.gradle added mobilertc as a dependency for the project.
implementation ‘androidx.security:security-crypto:1.1.0-alpha02’
implementation ‘com.google.crypto.tink:tink-android:1.5.0’
implementation ‘androidx.appcompat:appcompat:1.0.0’
implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’
implementation ‘androidx.recyclerview:recyclerview:1.0.0’
implementation ‘androidx.legacy:legacy-support-v4:1.0.0’
implementation ‘com.github.chrisbanes:PhotoView:2.3.0’
implementation project(‘:mobilertc’) -
Added Required Permissions to AndroidManifest.xml
-
Added the packaging options to the app/build.gradle
packagingOptions {
pickFirst ‘**/*.so’
} -
Runned react-native run-android command then everything worked well
-
Created App.js
import * as React from 'react';
import { ZoomVideoSdkProvider } from '@zoom/react-native-videosdk';
import IntroScreen from './src/screens/intro-screen/intro-screen';
export default function App() {
return (
<ZoomVideoSdkProvider
config={{
// appGroupId: '',
domain: 'zoom.us',
enableLog: true,
}}
>
<IntroScreen />
</ZoomVideoSdkProvider>
);
}
- Created Intro Screen
import React, { useEffect, useState } from 'react';
import { View, Text ,Platform} from 'react-native';
import { useZoom } from '@zoom/react-native-videosdk';
function VersionNumber() {
const [version, setVersion] = useState('0');
const zoom = useZoom();
//If it is deleted before build and written after build,
//there is no problem and the version number appears on the screen.
useEffect(() => {
zoom.getSdkVersion().then((v) => setVersion(v));
}, [zoom]);
//
return <Text>Version: {version} </Text>
}
export default function IntroScreen() {
return (
<View style={{ flex: 1 }}>
<VersionNumber></VersionNumber>
</View>
);
}
- After the application is build again, the application opens and shows Could not invoke RNZoomVideoSDK on the screen. The problem occurs during build because of getSdkVersion() in Intro Screen. When I remove the the useEffect and build the app it works fine. I add useEffect after build, the version number appears on the screen.
This Error appears on the phone
Could not invoke
RNZoomVideoSdk.getSdkVersionnull
No implementation found for java.lang.String
us.zoom.internal.SDKEngine.getVersionImpl(
)(tried Java_us_zoom_internal_SDKEngine_g
etVersionImpl and Java_us_zoom_internal_S
DKEngine_getVersionImpl__)
Smartphone (please complete the following information):
- Device: Sony G8341,
- OS: Android 9
Which React Native Video SDK version?
“@zoom1234/react-native-videosdk”: “^1.1.1”