Join Tencent RTC at NAB Show 2024 in Las Vegas!
Learn more 
Only  $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Only $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Grab It Now 
Join Tencent RTC at NAB Show 2024 in Las Vegas!
Learn more 
Only  $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Only $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Grab It Now 
Call
Overview
  • Android
    • Integration
    • UI Customization
    • Offline Call Push
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Release Notes
  • iOS
    • Integration
    • UI Customization
    • Offline Call Push
      • VoIP
      • APNs
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Release Notes
  • Web
    • Integration
      • Web&H5 (React)
      • Web&H5 (Vue3)
    • UI Customization
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Configure Resolution and Fill Mode
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallEvent
    • Release Notes
  • Flutter
    • Integration
    • Offline Call Push
    • UI Customization
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Beauty Effects
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Upgrading
    • Release Notes
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • Call Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • ErrorCode
  • FAQs
    • All Platform
    • Flutter
    • Web
Call

Offline Call Push

The offline wake-up function allows your app to receive ringtone calls for audio and video calls while running in the background or in offline mode. TUICallKit Flutter relies on the push capabilities provided by manufacturers: Apple, Google, Vivo, and Xiaomi for message notifications.

Configure offline push

iOS

iOS platform's offline wake-up support for APNs and VoIP, please refer to the specific configuration process:

Android

For the specific configuration process on the Android platform, please refer to: Offline Push (Flutter).

Customize offline message content

After the basic offline push configuration is successful, you can receive incoming call push notifications normally. If you need to customize the content of offline messages, you can use the params in the call and groupcall interfaces, and the TUIOfflinePushInfo to customize notification content, including title, content, and offline message ringtone. Specific usage as follows:
Future<void> call(String userId, TUICallMediaType callMediaType, [TUICallParams? params])

class TUICallParams {
TUIOfflinePushInfo offlinePushInfo;
}

class TUIOfflinePushInfo {
String? title;
String? desc;
bool? ignoreIOSBadge;
String? iOSSound;
String? androidSound;
String? androidOPPOChannelID;
int? androidVIVOClassification;
String? androidXiaoMiChannelID;
String? androidFCMChannelID;
String? androidHuaWeiCategory;
bool? isDisablePush;
TUICallIOSOfflinePushType? iOSPushType;
}}

enum TUICallIOSOfflinePushType {
APNs,
VoIP,
}

Customize offline message ringtone

iOS

Modify the params in the call and groupcall interfaces, and set the TUIOfflinePushInfo.iOSSound for the offline message ringtone on the iOS platform.

Android

FCM

After completing step 1: Configure offline push, you can receive message push notifications even when offline, but it is the default ringtone. If you need to support custom ringtones, you need to perform the following operations.
1. In the IM console-basic configuration, select Android native offline push configuration > select Google certificate for editing, add ChannelID, as shown in the following figure:



2. Add custom ringtone files to the android/app/src/main/res/raw/ directory of your project, such as "incoming_call.mp3".
3. After a successful login, use the tim_ui_kit_push_plugin plugin to register a NotificationChannel for playing custom ringtones to the Android system. Sample code as follows:
void createNotificationChannel() {
  AndroidNotificationChannelGroup group = new AndroidNotificationChannelGroup("GroupID", "GroupName");
AndroidFlutterLocalNotificationsPlugin plugin = AndroidFlutterLocalNotificationsPlugin();
plugin.createNotificationChannelGroup(group);

  AndroidNotificationChannel channel = AndroidNotificationChannel(
      "fcm_push_channel", "ChannelName",
      groupId: "GroupID",
      importance: Importance.high,
      enableLights: true,
      enableVibration: true,
      sound: RawResourceAndroidNotificationSound("incoming_call")); // Note: Media files do not need a suffix
  plugin.createNotificationChannel(channel);
}