Video Call | Group call |
| |
SDKAppID, SDKSecretKey
. They will be used in Step 5. For specific steps, please refer to activate the Service.flutter pub
add
tencent_calls_uikit
android/app/build.gradle
file of the project:android {......buildTypes {release {......minifyEnabled trueproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}}
proguard-rules.pro
file in the android/app
directory of the project, and add the following code in the proguard-rules.pro
file:-keep class com.tencent.** { *; }
android/app/build.gradle
file of your project.android {......defaultConfig {...... multiDexEnabled true }}
Info.plist
, under the first-level <dict>
directory, add the following two items. They correspond to the system's prompt messages when asking for microphone and camera permissions.<key>NSCameraUsageDescription</key><string>CallingApp needs to access your camera to capture video.</string><key>NSMicrophoneUsageDescription</key><string>CallingApp needs to access your microphone to capture audio.</string>
import 'package:tencent_calls_uikit/tencent_calls_uikit.dart';......class XXX extends StatelessWidget { const XXX({super.key});@override Widget build(BuildContext context) { return MaterialApp( navigatorObservers: [TUICallKit.navigatorObserver], ...... ); } }
import 'package:tencent_calls_uikit/tencent_calls_uikit.dart';import 'package:tencent_calls_uikit/debug/generate_test_user_sig.dart';......final String userID = 'xxxxx'; // Please replace with your UserId final int sdkAppID = 0; // Please replace with the SDKAppID you got from the console in step 1 final String secretKey = 'xxxx'; // Please replace with the SecretKey you got from the console in step 1void login() async {String userSig = GenerateTestUserSig.genTestSig(userID, sdkAppID, secretKey);TUIResult result = await TUICallKit.instance.login(sdkAppID, userID, userSig);if (result.code.isEmpty) { print('Login success'); } else { print('Login failed: ${result.code} ${result.message}'); }}
Parameter | Type | Description |
userID | String | Customers define their own User ID based on their business. You can only include letters (a-z, A-Z), digits (0-9), underscores, and hyphens. |
sdkAppID | int | |
secretKey | String | |
userSig | String | A security protection signature used for user log in authentication to confirm the user's identity and prevent malicious attackers from stealing your cloud service usage rights. |
GenerateTestUserSig.genTestSig
function to generate userSig. In this method, the SDKSecretKey is vulnerable to decompilation and reverse engineering, and once your key is leaked, attackers can steal your Tencent Cloud traffic.TUICallKit.instance.call('Android', TUICallMediaType.audio);import 'package:tencent_calls_uikit/tencent_calls_uikit.dart';......void call() {TUICallKit.instance.call('Android', TUICallMediaType.audio);}
| |
Caller | Callee |
Was this page helpful?