This document describes how to quickly run the IM demo for Android.
If you already have an app, record its SDKAppID and obtain key information.
A Tencent Cloud account can create a maximum of 300 IM apps. If you want to create a new app, disable and delete an unwanted app first. Once an app (along with its SDKAppID) is deleted, the provided service and all its data are lost. Please proceed with caution.
Please store the key information properly to prevent disclosure.
Download the IM demo project. For more information, see SDK and Demo Source Code.
To respect the copyright of emoji design, the downloaded demo project does not contain sliced images of major emoji elements. You can use your local emoji packs to configure code. Unauthorized use of the emoji pack in the IM demo may infringe on the design copyright.
Open the project in the terminal directory and find the file
Set relevant parameters in the
In this document, the method to obtain
UserSigis to configure a
SECRETKEYin the client code. In this method, the
SECRETKEYis vulnerable to decompilation and reverse engineering. Once your
SECRETKEYis disclosed, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for locally running a demo project and feature debugging.
UserSigdistribution method is to integrate the calculation code of
UserSiginto your server and provide an app-oriented API. When
UserSigis needed, your app can send a request to the business server to obtain a dynamic
UserSig. For more information, see Generating UserSig on the Server.
Import the demo project with Android Studio, and then compile and run it.
For more information, see the file
README.md in the corresponding directory of the demo project cloned in Step 3.
The demo is integrated with the audio/video call feature by default. However, the TRTC SDK on which the audio/video call feature relies currently does not support simulators. Please use real devices for demo running or debugging.