Before you start
Based on the official sample project, confirm the following environment requirements before integrating:- AndroidX: the sample project enables
android.useAndroidX=true. - Minimum OS version: the sample project’s
minSdkis24. - Compile and target version: the sample project’s
compileSdk/targetSdkis35. - Gradle repository configuration: prefer configuring repositories in
settings.gradle(Gradle 7+); older projects can keep using the rootbuild.gradle.
Configure the Maven repository
If your project uses Gradle 7+, add the repository to the rootsettings.gradle:
build.gradle instead:
Add the SDK dependency
Add the dependency to your app module’sbuild.gradle (usually app/build.gradle):
groupId:cn.seastart.rtcartifactId:rtcversion: replace with the SDK version you want to integrate
Integration notes
Before you start coding, also confirm the following:- Runtime permissions: if your app captures audio and video, request the
CAMERAandRECORD_AUDIOpermissions in your app. - ABI compatibility: the SDK currently supports
arm64-v8aandarmeabi-v7a; include the ABIs that match your target devices. - Background microphone capture: capture is decoupled from joining and publishing. If you need to keep calling
LocalMicTrack.startCapture(...)in the background, configure a microphone-type foreground service and the related permissions as required by your Android version. - Next steps: after adding the dependency, continue with Quickstart for
RTCEngine.create(...),initSDK(), joining a channel, publishing, and subscribing. To manage output devices such as the speaker, earpiece, and Bluetooth headsets, see Audio routing (Chinese).
Media streaming and video display
- Supports the FY (Freewind) and Wangsu media streaming services, using the vendor configuration assigned by the server.
- For local preview and remote video display, use
VcsPlayerGlTextureVieworVcsPlayerGlSurfaceViewfrom thecn.seastart.rtc.media.original.renderpackage. Use the same package path in code imports and XML layouts. For usage, see Video rendering (Chinese). - External video is fed through
LocalCustomVideoTrackas unencoded I420 frames, and the SDK handles encoding and publishing. For integration, see Custom tracks (Chinese).