TUIRoom is an open-source UI component for audio/video communication. With just a few lines of code changes, you can integrate it into your project to implement screen sharing, beauty filters, low-latency video calls, and other features. In addition to the Android component, we also offer components for iOS, Windows, macOS, and more.
Note
All components of TUIKit use Tencent Cloud's TRTC and Chat services. When you activate TRTC, Chat and the trial edition of the Chat SDK (which supports up to 100 DAUs) will also be activated automatically. For Chat billing details, see Pricing.
Integration
Step 1. Download and import the TUIRoom component
Go to the component's GitHub page, clone or download the code, and copy the tuiroom and debug, and tuibeauty folders in the Android directory to your project. Then, do the following to import the component:
1. Add the code below in setting.gradle:
include ':tuiroom'
include ':debug'
include ':tuibeauty'
2. Add dependencies on tuiroom, debug, and tuibeauty to the build.gradle file in app:
api project(':tuiroom')
api project(':debug')
api project(':tuibeauty')
3. Add the TRTC SDK (liteavSdk) and Chat SDK (imsdk) dependencies in build.gradle in the root directory:
Step 2. Configure permission requests and obfuscation rules
1. Configure permission requests for your app in AndroidManifest.xml. The SDKs need the following permissions (on Android 6.0 and later, the mic permission must be requested at runtime.)
SDKAppID: TRTC application ID. If you haven't activated TRTC, log in to the TRTC console, create a TRTC application, click Application Info, and select the Quick Start tab to view its SDKAppID.
Secretkey: TRTC application key. Each secret key corresponds to a SDKAppID. You can view your application’s secret key on the Application Management page of the TRTC console.
userId: ID of the current user, which is a string that can contain only letters (a-z and A-Z), digits (0-9), hyphens (-), and underscores (_). We recommend that you keep it consistent with your user account system.
UserSig: Security signature calculated based on SDKAppID, userId, and Secretkey. You can click here to quickly generate a UserSig for testing. For more information, see UserSig.