Other languages: 简体中文
This open source sample project shows how to use the new MeidaIO interface provided in Agora RTC SDK(>= 2.1).
In this sample project, the following features are implemented using the new MediaIO API:
- Enable to sharing mobile phone screen or share a specific View to the remote
2, Use both local video and Camera as the data source, source can be local played and sent to the remote, and the source can be switched.
A tutorial demo for Agora Video SDK can be found here: Agora-Android-Tutorial-1to1
You can find share screen demo for Android with old APIs here: Agora-Screen-Sharing-Android
In order to build and run the sample application you must obtain an App ID:
- Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
- Navigate in the Dashboard tree on the left to Projects > Project List.
- Locate the file app/src/main/res/values/strings_config.xml and replace <#YOUR APP ID#> with the App ID in the dashboard.
<string name="agora_app_id"><#YOUR APP ID#></string>
The SDK must be integrated into the sample project before it can opened and built. There are two methods for integrating the Agora Video SDK into the sample project. The first method uses JCenter to automatically integrate the SDK files. The second method requires you to manually copy the SDK files to the project.
- Clone this repository.
- Open app/build.gradle and add the following line to the
dependencies
list:
...
dependencies {
...
compile 'io.agora.rtc:full-sdk:2.2.3'
}
- Clone this repository.
- Download the Agora Video SDK from Agora.io SDK.
- Unzip the downloaded SDK package.
- Copy the .jar file from the libs folder of the downloaded SDK package to the /apps/libs folder of the sample application.
- Copy the .so files from the armeabi-v7a folder of the downloaded SDK package to the /app/src/main/jniLibs/armeabi-v7a folder of the sample application.
- (Optional) Copy the .so files from the arm64-v8a folder of the downloaded SDK package to the /app/src/main/jniLibs/arm64-v8a folder of the sample application.
- (Optional) Copy the .so files from the x86 folder of the downloaded SDK package to the /app/src/main/jniLibs/x86 folder of the sample application.
Finally, open project with Android Studio, connect your Android device, build and run.
Or use Gradle
to build and run.
- Android Studio 2.0 or above
- Real devices (Nexus 5X or other devices)
- Some simulators are function missing or have performance issue, so real device is the best choice
- You can find full API document at Document Center
- You can file bugs about this demo at issue
The MIT License (MIT).