1. Sign in to the TRTC console, click Create Application in the Applications section. You may skip this step if you already have an application.
2. Obtain your application's SDKAppID and SDKSecretKey in the Basic Information section.
3. Replace SDKAppID and SDKSecretKeyin GenerateTestUserSig.java under TRTC-API-Example/Debug/src/main/java/com.tencent.trtc.debug directory.
Note:
In the demo above, we used SDKSecretKey to generate UserSig locally in order to help you go through the demo easier. However, in the production environment, you are not supposed to generate userSig in this way, which may lead to SDKSecretKey leakage, thereby creating a chance for attackers to steal your TRTC traffic. The correct way to generate UserSig is to integrate Server-Side Generation of UserSig on your server. When an user enters the room:
Send a http request to your server.
Generate a UserSig on your server.
Return it to the user to enter the room.
When you deploy your page to a production environment, you need to have your page accessed through the HTTPS(e.g. https://domain/xxx). For the reason, please refer to the document Page Access Protocol Restriction Description.
Step 3. Run the project
Open the project root directory (/TRTC-API-Example/) in Android Studio, then run the project.
Step 4. Discover TRTC features
You may select and experience the features aligned with your interests: