final result = await call.getOrCreate(
memberIds: memberIds,
ringing: true,
custom: {'display_name': 'Stream group call'},
);
Customization
Display Name Customization
The Stream backend populates two key properties in the VoIP push notification payload that determine the call’s display name:
call_display_name
: This calculated property evaluates the following custom data fields on the Call object in order of priority:display_name
name
title
If none of these fields are set, the property defaults to an empty string.
created_by_display_name
: This property is always populated and contains the name of the user who initiated the call.
By default, the SDK prioritizes call_display_name
for the ringing notification display. If this value is empty, it falls back to created_by_display_name
.
UI Customization
The SDK leverages the flutter_callkit_incoming package to manage CallKit calls on iOS and custom notifications on Android. This package provides extensive customization options that you can configure through the StreamVideoPushNotificationManager
using the pushParams
parameter.
Here’s what you can customize:
Android
Customize Button Text
You can personalize the text for Accept and Decline buttons, as well as the message displayed in the default missed call notification:
StreamVideo(
...,
pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
...,
pushParams: const StreamVideoPushParams(
textAccept: 'Accept Call',
textDecline: 'Decline Call',
missedCallNotification: NotificationParams(
subtitle: 'Missed Call',
callbackText: 'Call Me Back',
)
),
),
);
Customize Ringtone
To set a custom ringtone for incoming calls, specify the ringtonePath
with your audio file name. The file must be placed in the /android/app/src/main/res/raw/
directory.
If no custom ringtone is specified, the system will use the default ringtone.
StreamVideo(
...,
pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
...,
pushParams: const StreamVideoPushParams(
android: AndroidParams(
// ringtone file is: /android/app/src/main/res/raw/ringtone_default.mp3
ringtonePath: 'ringtone_default',
)
),
),
);
Customize Notification Appearance
You can customize the visual appearance of the ringing notification using these color parameters:
backgroundColor
: Controls the background color of the incoming call screenactionColor
: Defines the color for buttons and interactive elements in the notificationtextColor
: Sets the text color in the full-screen notification
iOS CallKit
While Apple’s CallKit framework limits customization options, you can still configure these essential aspects:
iconName
: Specifies the app icon to display in the CallKit call screen. Ensure your icon is properly prepared and added as described in Apple’s documentationringtonePath
: Adds a custom ringtone by placing your audio file in the root project directory at/ios/Runner/Ringtone.caf
. Make sure it’s included in the Copy Bundle Resources section of Build Phases in Xcode.
StreamVideo(
...,
pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
...,
pushParams: const StreamVideoPushParams(
ios: IOSParams(
iconName: 'IconMask',
ringtonePath: 'system_ringtone_default',
),
),
),
);