


Please ensure that the development environment meets the following technical requirements:
The Android ABIs currently supported by the SDK: armeabi-v7a, arm64-v8a, x86, x86_64.
Add the following line to your app/build.gradle
file:
...
dependencies {
...
// please specify the SDK version number (e.g. 1.11.0)
// The latest version number can be found in the SDK release history
implementation 'im.zego:express-video:x.y.z'
}
Please refer to the ZEGO Express-Video Android SDK Release History for the latest version.
Note: Starting from 1.11.0 version, if the SDK is integrated through Jcenter, the dependent commands change from
implementation 'im.zego:express-engine-video: x.y.z'
toimplementation 'im.zego:express-video: x.y.z'
. Customers using older versions are not affected, but no subsequent updates will be done for theexpress-engine-video
packages. So, it is recommended that all customers using versions 1.11.0 or above switch to integrate theexpress-video
packages.
If you want to use the Express-Video SDK that has the with whiteboard feature, please use the following command:
implementation 'im.zego:express-video-whiteboard: x.y.z'
.
Download the ZEGO Express-Video Android SDK and unzip the downloaded SDK package.
Copy the unzipped .jar file and all the folders containing the .so files to your project directory (e.g. app/libs
).
Add SDK Import Statements. Open the file app/build.gradle
, and add the following contents:
Add the ndk
node inside the defaultConfig
node to specify the supported ABIs.
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
Add the sourceSets
node inside the android
node to specify the directory containing the SDK files.
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
Add the following code in the dependencies
node
implementation fileTree(dir: 'libs', include: ['*.jar'])
Open the file app/src/main/AndroidManifest.xml
, and add the following code:
<!-- Permissions required by the SDK -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Permissons required by the App -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
Note: For Android 6.0 or higher, some important permissions must be requested at runtime rather than declared statically in the file
AndroidMainfest.xml
, therefore you also need to add the following code to do so (requestPermissions is a method of an Android Activity)
String[] permissionNeeded = {
"android.permission.CAMERA",
"android.permission.RECORD_AUDIO"};
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (ContextCompat.checkSelfPermission(this, "android.permission.CAMERA") != PackageManager.PERMISSION_GRANTED ||
ContextCompat.checkSelfPermission(this, "android.permission.RECORD_AUDIO") != PackageManager.PERMISSION_GRANTED) {
requestPermissions(permissionNeeded, 101);
}
}
To prevent the Zego SDK public class names from being obfuscated, please add the following code in the file proguard-rules.pro
.
-keep class **.zego.**{*;}
After integrating the SDK, you can proceed to initialize the SDK. Use the next/previous buttons below or the side navigation bar on the left to navigate to the related documents.
Free trial
Contact us
Cont-act us