This article describes how to quickly run the sample source code and experience basic audio and video calling services.
Before you attempt to integrate the ZEGO Express SDK, make sure that the development environment meets the following requirements (the following instructions are all based on a macOS computer):
To know Android Studio's version changes, refer to the Android Studio release notes.
For version dependencies among Android Gradle Plugin, Gradle, and SDK Tool, please refer to Android Gradle Plugin Release Notes.
Go to ZEGOCLOUD Admin Console to create a new project, and get the AppID and AppSign of your project.
The SDK now also supports using Token for authentication, if you want to change your authentication mode, refer to the Guide for upgrading the authentication mode from using the AppSign to Token.
The following directory structure is the file structure of the android_java
subdirectory, and the file paths mentioned below are all relative to this directory.
.
├─ README.md
├─ README_zh.md
├─ VERSION.txt
└─ ZegoExpressExample
...
├─ AdvancedAudioProcessing # Advanced audio features
├─ AdvancedStreaming # Advanced stream publish and play
├─ AdvancedVideoProcessing # Advanced video features
├─ CommonFeatures # Common functions
├─ CommonTools
├─ DebugAndConfig # Debug and configure
├─ KeyCenter # Fill in the AppID and AppSign of the application in the KeyCenter.Java file
├─ Others # Other functions
├─ Quickstart # Quick start
├─ Scenes # Best practices
├─ build.gradle
├─ gradle
├─ gradle.properties
├─ gradlew
├─ gradlew.bat
├─ local.properties
├─ log
├─ main
│ ├─ .gitignore
│ ├─ build
│ ├─ build.gradle
│ ├─ libs # ZegoExpressVideo Android SDK storage directory
│ ├─ proguard-rules.pro
│ ├─ src
│ └─ wrap
└─ settings.gradle
Open Android Studio and click Open an Existing Project.
In the decompressed example source code folder, select the ZegoExpressExample
folder and open it.
The AppID and AppSign required for SDK initialization are missing in the sample source code. You need to modify the KeyCenter.java
file in the ./KeyCenter/src/main/java/im/zego/keycenter
directory. Please refer to the Prerequisites. Make sure the AppID and AppSign are correctly filled in (Note: L needs to be added after the AppID). Otherwise, the sample source code cannot run properly.
We recommend you run your project on a real device. If your app runs successfully, you should hear the sound and see the video captured locally from your device.
To test out the real-time audio and video features, visit the ZEGO Express Web Demo, and enter the same AppID
, Server
and RoomID
to join the same room. If it runs successfully, you should be able to view the video from both the local side and the remote side, and hear the sound from both sides as well.
In audio-only scenarios, no video will be captured and displayed.
Since no specific values for AppID and AppSign exist in the downloaded sample source code, please refer to the Prerequisites in this article.