Android Demo Quick Run
Tencent Cloud Contact Center Android SDK enables agents to handle calls via PC, SIP phones, or mobile.
This guide shows how to quickly set up and run the Android demo.
Developer Environment Requirements
Android Studio 3.5+。
Android 4.1 (SDK API 16) or later.
Prerequisite
Key Concepts
SdkAppId: A unique application ID created in Cloud Contact Center console. Each Tencent Cloud account can create up to 20 TCCC applications. UserID: The member ID added in the Tencent Cloud Contact Center, usually an email address. For first-time setup, the admin account and password can be found in the Internal Message (sub-accounts must subscribe to TCCC product notification). Each SDKAppID supports multiple UserIDs, and additional licenses can be purchased atAgent Purchase if needed. SecretId and SecretKey: Developers need credentials to call the Cloud API. SecretId and Secretkey can be created in the Tencent Cloud console. Token: A login credential obtained viaCreateSDKLoginToken API. The app requests real-time tokens from your server, which stores the generation code and encryption key. Steps
Step 1: Download Source Code 'tccc-agent-java-example'
Step 2: Configure Project File 'tccc-agent-java-example'
1. Open debug/src/main/java/com/tencent/tcccsdk/debug/GenerateTestUserToken.java
2. Set parameters in GenerateTestUserToken.java file:
USERID: Agent account, format: xxx@qq.com
.
SDKAPPID: Cloud Contact Center SDKAppId, which needs to be replaced with your own account's SDKAppId
SECRETID: ID of the encryption key used to calculate the signature
SECRETKEY: Key of the encryption key used to calculate the signature
Caution:
Do not include the token generation code in your app's production version for the following reasons:
The provided code is for testing basic SDK features only and is not secure for production. SECRETKEY in client-side code can be easily reverse-engineered, and web code is even more vulnerable. If your key is leaked, attackers can generate valid tokens and misuse your Tencent Cloud resources.
Safer approach is to place the token generation code and encryption key on your server. The app should request real-time tokens from your server as needed. This method is more secure, as breaching a server is significantly harder than cracking a client-side app. For more details, see Creating SDK Login Token. Step 3: Compile and Run the Demo
Open source code project tccc-agent-java-example
in Android Studio (version 3.5 or later), click Run.
1. Log In.
2. Enter the phone number and start a call.
Showcase
Basic features as shown below:
Was this page helpful?