Platform | Version |
Flutter | 3.7.0 and above versions. |
Android | Android 4.1 (SDK API level 16) or later (Android 5.0 (SDK API level 21) or later is recommended). Android Studio 3.5 or later (Gradle 3.5.4 or later). Mobile phone on Android 4.1 or later. |
iOS | iOS 12.0 and higher. |
dependencies:tencent_conference_uikit: The latest version
flutter pub get
GetX
state management library, you need to replace MaterialApp
with GetMaterialApp
in your application. Alternatively, you can set the navigatorKey
attribute in your MaterialApp
to Get.key
for the same effect.// This step requires importing the get package before proceeding.// Since the tencent_conference_uikit already has a dependency on get, you don't need to make any additional configurations in your pubspec.yaml.import 'package:get/get.dart';class MyApp extends StatelessWidget {@overrideWidget build(BuildContext context) {return GetMaterialApp( // UseGetMaterialApp
to replaceMaterialApp
// Your original MaterialApp content);}}
Non-Global Symbols
to maintain the necessary global symbol information.iOS
, authorize the microphone and camera usage rights (Android
has declared the relevant permissions in the SDK, and no manual configuration is necessary).Info.plist
. They correspond to the messages in the popup licensing dialog box while microphone and camera permissions are requested.<key>NSCameraUsageDescription</key><string>TUIRoom requires access to your camera.</string><key>NSMicrophoneUsageDescription</key><string>TUIRoom requires access to your microphone.</string>
post_install do |installer|installer.pods_project.targets.each do |target|flutter_additional_ios_build_settings(target)target.build_configurations.each do |config|config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','PERMISSION_MICROPHONE=1','PERMISSION_CAMERA=1',]endendend
import 'package:rtc_room_engine/rtc_room_engine.dart';var result = await TUIRoomEngine.login(SDKAPPID, // Please replace with your SDKAPPID'userId', // Please replace with your user ID'userSig', // Please replace with your userSig);if (result.code == TUIError.success) {// login success} else {// login error}
SDKAppID
is incorrect.UserSig
is set to the value of Secretkey
mistakenly. The UserSig is generated by using the SecretKey
for the purpose of encrypting information such as SDKAppID
, UserID
, and the expiration time. But the value of the UserSig
cannot be directly substituted with the value of the SecretKey
.UserID
is set to a simple string such as 1, 123, or 111, and your colleague may be using the same UserID while working on a project simultaneously. In this case, login will fail as TRTC doesn't support login on multiple terminals with the same UserID
. Therefore, we recommend you use some distinguishable UserID values during debugging.genTestUserSig
function to calculate UserSig locally, so as to help you complete the current integration process more quickly. However, this scheme exposes your SecretKey in the application code, which makes it difficult for you to upgrade and protect your SecretKey
subsequently. Therefore, we strongly recommend you run the UserSig calculation logic on the server and make the application request the UserSig calculated in real time every time the application uses the TUIRoomKit component from the server.import 'package:tencent_cloud_chat_sdk/enum/V2TimSDKListener.dart';import 'package:tencent_cloud_chat_sdk/enum/log_level_enum.dart';import 'package:tencent_cloud_chat_sdk/models/v2_tim_callback.dart';import 'package:tencent_cloud_chat_sdk/tencent_im_sdk_plugin.dart';// Initializevar initResult = await TencentImSDKPlugin.v2TIMManager.initSDK(sdkAppID: SDKAPPID, // Replace with your SDKAPPIDloglevel: LogLevelEnum.V2TIM_LOG_INFO, // Log registration levellistener: V2TimSDKListener(), // Event listener. When using the floating chat, pass an empty object here.);if (initResult.code == 0) { // Initialized successfully// LoginV2TimCallback imLoginResult = await TencentImSDKPlugin.v2TIMManager.login(userID: 'userId', // Replace with your userIDuserSig: 'userSig', // Replace with your userSig);}
setSelfInfo
.import 'package:rtc_room_engine/rtc_room_engine.dart';TUIRoomEngine.setSelfInfo(userName, avatarURL);
Parameter | Type | Description |
userName | String | User name |
avatarURL | String | User profile photo URL |
quickStart
method of ConferenceSession
, you can start a quick conference.import 'package:tencent_conference_uikit/tencent_conference_uikit.dart';ConferenceSession.newInstance('your roomId')..onActionSuccess = _quickStartSuccess..onActionError = _quickStartError..quickStart();void _quickStartSuccess() {// You can navigate to the conference page on your own in this success callback of starting a quick conference.Navigator.push(context,MaterialPageRoute(builder: (context) => ConferenceMainPage(),),);}void _quickStartError(ConferenceError error, String message) {debugPrint("code: $error message: $message");}
join
method of ConferenceSession
, you can join the specified conference.import 'package:tencent_conference_uikit/tencent_conference_uikit.dart';ConferenceSession.newInstance('your roomId')..onActionSuccess = _joinSuccess..onActionError = _joinError..join();void _joinSuccess() {//You can navigate to the conference page on your own in this success callback of joining a conference.Navigator.push(context,MaterialPageRoute(builder: (context) => ConferenceMainPage(),),);}void _joinError(ConferenceError error, String message) {debugPrint("code: $error message: $message");}
Was this page helpful?