tencent cloud

Last updated: 2025-10-11 09:46:03
Android
Last updated: 2025-10-11 09:46:03

Development Environment Requirements

Android Studio 3.0+
Android 6.0 (API 23) and later

Prerequisites

Step 1: Creating a New Application

1. Log in to the LCIC console, select Overview in the left navigation bar, and click New.
2. You will enter the application creation page and enter an application name, such as TestLCIC. If you have already created an application, you can use the existing application.

Note
Mobile integration requires Premium subscription. If you need to create commercial applications, you can create corresponding versions of applications on the purchase page based on your business needs.

Step 2: Acquiring the SDKAppId and the Key (SecretKey)

1. Navigate to Application Management> Settings to acquire the SDKAppId.
2. Log in to the CAM console to acquire the key. In case of no key, you must create a key in API Key Management. For details, refer to Key Management.




Step 3: Importing the SDK

Remote SDK Building for a Gradle Project

The LCIC SDK has been released to the Maven central repository. You can enable automatic downloading of updates through Gradle configuration.
1. In build.gradle of the application module, add the LCIC SDK dependency to dependencies.
dependencies {
// LCICSDK component
implementation 'com.tencent.edu:TCICSDK_LITE:1.8.17'
}
2. In defaultConfig, specify the CPU architecture utilized by the Application.
defaultConfig {
ndk{
abiFilters "armeabi-v7a","arm64-v8a"
}
}
Note:
The LCIC SDK currently supports both armeabi-v7a and arm64-v8a architectures and can be flexibly configured based on business needs. Please note that the package size may vary when supporting different architectures.
3. In compileOptions, specify JDK 1.8 for compilation.
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
4. If the AGP version is greater than 4.2.0, you need to configure the following in the build.gradle file of your app module:

android {
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
}
5. Click Sync Now, to automatically download the SDK and integrate it into the project.

Step 4: Configuring Application Permissions

In the AndroidManifest.xml, configure the application permissions. The LCIC SDK requires the following permissions:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Note:
When minSdkVersion ≥ 23, add the android:extractNativeLibs="true"parameter to the application tag in AndroidManifest.xml.

Step 5: Configuring Obfuscation Rules (Optional)

If obfuscation is enabled, you must add the LCIC SDK-related classes to the non-obfuscation list in the proguard-rules.pro file.
-keep class com.tencent.** { *; }

Step 6: Applying for a License of the SDK

You need to contact our business team to apply for SDK permissions. Please provide the corresponding information including the app name, Package Name (Android) and Bundle ID (iOS). After confirming the information is correct, we will complete the process within 1 business day.
Note:
Premium subscription only supports authorizing one official package name. Please confirm the information and send the relevant details.
The package name is used for X5 kernel and Live Event Broadcasting player signature authorization. Please provide the App Name, Package Name, and Bundle ID of the official application that requires authorization.

Step 7: Initializing the X5 Kernel

The X5 kernel offers advantages such as better compatibility and faster speeds compared to the system WebView. The LCIC SDK relies on the WebView of the X5 kernel. We now provide a static integration method for the X5 kernel, which improves the loading success rate and takes effect without requiring a process restart.
1. Please check the box to agree to the Privacy Policy agreement.
Note:
It is recommended to invoke the method for initializing the X5 kernel only after obtaining the user's consent to the Privacy Policy agreement. This prevents the issue of collecting personal information without user authorization when submitting the application for release.
2. Initialize the X5 kernel.​
Before entering the classroom, you must first check whether the X5 kernel initialization is complete. The initialization method must be executed in the main process (the SDK provides the TCICInitProvider.isMainProcess(context)method to determine if the current context is the main process).
Once the onViewInitFinishedmethod has been called back, re-initialization is not allowed. It should be initialized only once.
if (TCICInitProvider.isMainProcess(context)) {
//Initializing the X5 Kernel
TCICManager.getInstance().initX5Core(licenseKey, new TBSSdkManageCallback() {
@Override
public void onCoreInitFinished() {
}
@Override
public void onViewInitFinished(boolean isX5Core) {
//The X5 Kernel initialization completed, you can enter the class.
}
});
}

Note:
You must acquire the X5 kernel's licenseKey, namely the licenseKey parameter in TCICManager.getInstance().initX5Core(licenseKey); by Step 6.
Before entering the classroom, it is recommended to verify whether the X5 kernel has been successfully installed. The verification method is isX5InstallSuccess.

Step 8: Acquiring the Parameters Necessary for Classroom Entry

TCICClassConfig Parameter Explanation:
1. Navigate to Application Management > Settings through the Console to acquire the SDKAppId, namely the school ID (schoolId).
2. Create a classroom through the TencentCloud API CreateRoom, to obtain the classroom ID (classid).
3. Register a user by calling the TencentCloud API RegisterUser, to acquire the corresponding user ID (userid).
4. Log in through the TencentCloud API LoginUser, to acquire the user authentication token.
5. Parameters such as scene, lng, camera, mic, and speaker are not required. if they are not specified, the default values are used.
Field
Type
Description
Remarks
Required
schoolId
Integer
School ID
Navigate to Application Management > Settings through the console, to acquire the SDKAppId.
Yes
classId
Long
Classroom ID
RoomId returned by creating a classroom through the CreateRoom API.
Yes
userId
String
User account
Acquired through the RegisterUser API.
Yes
token
String
Background authentication parameter
Acquired through the LoginUser API.
Yes
scene
String
Scenario name
Used to distinguish different custom layouts. It is configured through the SetAppCustomContent API.
No
lng
String
Language parameter
Currently supported languages include Chinese (Simplified), Chinese (Traditional), English, Korean, Japanese, Arabic, Vietnamese, and Indonesian. You can display the corresponding language by concatenating the appropriate parameters. The parameters are: zh-CN, zh-TW, en-US, ko, ja, ar, vi, id.
Additionally, the following configuration must be set:
TCICWebViewManager.getInstance().setClassLanguage(this, env, lng);
where the lngparameter specifies the language code.
Support for additional languages such as Spanish, French, German, Thai, and Malay is also available. For more information, please contact our business or product team.
No
camera
Integer
Initializing and turning on the camera
1 indicates turning on the camera, and 0 indicates turning off the camera. The default is 1.
No
mic
Integer
Initializing and turning on the microphone
1 indicates turning on the microphone, and 0 indicates turning off the microphone. The default is 1.
No
speaker
Integer
Initializing and turning on the speaker
1 indicates turning on the speaker, and 0 indicates turning off the speaker. The default is 1.
No

Step 9: Initiating the Main Page of the Component

The main page of the LCIC component can be initiated by merely 4 parameters, respectively school ID, classroom ID, user account, and token.
Note:
schoolId is SDKAppId
Intent intent = new Intent(getActivity(), TCICClassActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
Bundle bundle = new Bundle();
TCICClassConfig initConfig = new TCICClassConfig.Builder()
.schoolId(schoolId)
.classId(classId)
.userId(userId)
.token(token)
.build();
bundle.putParcelable(TCICConstants.KEY_INIT_CONFIG, initConfig);
intent.putExtras(bundle);
startActivity(intent);
If you want to receive a notice on exiting the classroom, you may register for the local broadcast of TCICConstants.ON_CLASS_EXITED_ACTION, as shown in the following code snippet:
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(TCICConstants.ON_CLASS_EXITED_ACTION);
LocalBroadcastManager.getInstance(context).registerReceiver(broadcastReceiver, intentFilter);

Other Recommendations

We suggest you to integrate Tencent Bugly when using LCICSDK, so that you can quickly identify and solve exceptions, keep abreast of product operation trends, and promptly address user feedback. For the integration guidance, refer to the Tencent Bugly Official Website.
For further reference, consult the Development Demo.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback