Upgrade Instructions

TUICallKit is a new audio and video calling UI component launched by Tencent Cloud. It is an upgraded version of TUICalling, which supports more functional features such as group calling and AI noise reduction, and supports calling between all platforms with greater stability. We welcome you to use the new TUICallKit component. Before upgrading, please note the following:
TUICalling and TUICallKit support mutual calling. Please keep the SDKAppID unchanged before and after the upgrade, otherwise it will affect mutual communication.
TUICallKit needs to be used with the IM audio and video calling capability package. You can click on the IM console, enter the Basic Configuration page of the corresponding SDKAppID application, and find the Call function area in the lower right corner of the page. Click Try now to open TUICallKit's 7-day free trial service. If you need to officially launch the application, click Purchase to enter the purchase page.

The IM audio and video calling capability provides differentiated paid versions for different business needs, and you can learn about the included features and purchase the version that suits you on the IM purchase page.

Upgrade Steps

TUICallKit was designed to accommodate the upgrade needs of TUICalling customers, and can be upgraded in just two simple steps, which is expected to take 20 minutes:

Upgrade the dependency to TUICallKit

Complete the dependency upgrade to TUICallKit in your project and set the configuration file pubspec.yaml for your project:
# Remove the old dependency tim_ui_kit_calling_plugin and add the new dependency tencent_calls_uikit:
After setting up, execute the command flutter pub get.
If you previously used it with IM components such as TUIChat and TUIContact, you can use TUICallKit normally after completing this step. The compatibility logic has been handled internally in the TUICallKit component.

2、Modify API usage

After completing the above steps, your project will not compile normally. You need to replace the TUICalling API with the new TUICallKit API. You can refer to the following API comparison information and search and replace it.
API meaning
Create a TUICallKit instance
Replace reference and name.
Set the user's nickname
Integrate the interface for setting avatar and nickname into the setSelfInfo interface.
Set the user's avatar
Integrate the interface for setting avatar and nickname into the setSelfInfo interface.
Initiate a 1v1 call
See interface changes for details.
Initiate a group call
Actively join the current group call
Set custom ringtone
Replace reference and name.
Enable/disable mute mode
Replace reference and name.
Enable/disable floating window function
Replace reference and name.
Set listener
See TUICalling.registerListener interface changes for details.
Here are the adaptation solutions for the two APIs with significant changes during this upgrade: Interface Changes

TUICalling Code Example:
// Original Interface
Future<void> call(String userId, CallingScenes type, [OfflinePushInfo? offlinePushInfo]);
TUICallKit Code Example:
// New Interface
Future<void> call(String userId, TUICallMediaType callMediaType, [TUICallParams? params]);

// New Calling Method
TUIOfflinePushInfo offlinePushInfo = TUIOfflinePushInfo();
offlinePushInfo.title = "Flutter TUICallKit";
offlinePushInfo.desc = "This is an incoming call from Flutter TUICallkit";
TUICallParams params = TUICallParams(offlinePushInfo: offlinePushInfo);,, params);

TUICallKit.setCallingListener Interface Changes

TUICalling Code Example:
onInvited: (params) {
onCallingCancel: () {
TUICallKit Code Example:
onError:(int code, String message) {
onCallCancelled: (String callerId) {
onCallBegin:(TUIRoomId roomId, TUICallMediaType callMediaType, TUICallRole callRole) {
After upgrading the above APIs, you can use the TUICallKit component normally.