Run the Demo Project
Here is the professional English translation of the provided technical document, strictly adhering to the given glossary and style guide:
The RC RTC product provides a QuickDemo sample application project (Github · Gitee) that demonstrates key features of RC's real-time communication products including RTC calls, video conferences, and Low-Latency Live Streaming on Android. This helps developers experience the product and accelerate integration for scenarios like one-to-one/group chat, voice/video calls, voice chatrooms, entertainment live streaming, online classrooms, and multi-person meetings.
QuickDemo is organized into functional modules with two demo applications (callapp and rtcapp) showcasing core capabilities. As an open-source project, you can modify any code section to explore implementation details.
Environment Requirements
- Android Studio 3.0 or later. Download and install from official site if not already installed
- Android SDK 4.4+ (minSdkVersion ≥ 19)
- Android Build Tools 21+ (latest version recommended for optimal compilation)
- JDK 1.7+
RC Developer Account
-
Register a developer account. Your first app will be auto-created in Console with a development environment App Key using the China (Beijing) Data Center by default
-
Get your development environment App Key
tipEach app has two distinct App Keys for development and production environments (data isolated between environments). Switch to your production App Key for pre-release testing before official launch.
-
For QuickDemo testing, we recommend selecting the China (Beijing) Data Center. If using the global data center, you'll need to manually modify SDK connection endpoints in QuickDemo. See data center for configuration details.
Enabling RTC Services
Development environment apps include 10,000 free trial minutes. Follow these steps to activate RTC services for immediate testing (free tier expires after usage).
For production environment activation, prepayment is required. See [Enabling RTC Services] for details.
Device Setup
The sample app requires Android 4.4+ devices/emulators or HarmonyOS devices.
- For physical devices: Follow Run apps on a hardware device
- For emulators: Use the AVD Manager in Android Studio to create virtual devices
Running QuickDemo
Before proceeding, ensure you've completed these prerequisites:
- Registered RC developer account
- Obtained App Key and App Secret
- Activated RTC free trial (wait 15 minutes after activation)
-
Clone the sample code:
git clone https://github.com/rongcloud/rtc-quickdemo-android.git -
In Android Studio, select Open an Existing Project. Allow Gradle to resolve all Maven dependencies (typically 2-5 minutes depending on network conditions).
-
Open
DemoApplication.javaand enter your App Key/Secret from Console:Path: Project view
<demo-app-name>/src/main/java/cn/rongcloud/demo//**
* TODO: Replace with your AppKey
*/
public static final String APP_KEY = "";
/**
* TODO: Replace with your App Secret
* WARNING: Storing App Secret in client code is ONLY for demo purposes.
* In production, this creates severe security risks if decompiled, as the Secret
* can be used to request privileged operations like user bans and room kicks.
*/
public static final String APP_SECRET = "";dangerThis tutorial demonstrates client-side App Secret storage ONLY for educational purposes. The App Secret grants permissions to obtain user Tokens and perform high-privilege operations. Storing it in client code risks exposure through decompilation.
Compromised App Secrets enable service traffic theft and destructive high-permission actions.
Correct approach: Store App Secret ONLY on your application server with client-facing APIs. See RTC Server API Documentation for implementation guidance.
-
Select either
callapporrtcappfrom the Android Studio toolbar and click Run. -
After successful launch, enter a user ID to begin testing. Physical device testing is recommended.
