Customization

The flutter_callkit_incoming package is used to handle CallKit call management on iOS and display custom notifications on Android. This package offers several customization options, which can be configured through the StreamVideoPushNotificationManager using the pushParams parameter.

Specifically you can customize those things:

Android Custom Notification Customization

Customize Texts

You can modify the text for the Accept and Decline buttons, as well as the text shown in the default missed call notification on Android:

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. The file must be added to the /android/app/src/main/res/raw/ directory. If not specified, the system ringtone will be used by default.

StreamVideo(
    ...,
    pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
        ...,
        pushParams: const StreamVideoPushParams(
            android: AndroidParams(
                ringtonePath: '/android/app/src/main/res/raw/ringtone_default.pm3',
            )
      ),
    ),
  );

Customize notification UI

You can adjust the colors of various elements in the ringing notification using the following parameters:

  • backgroundColor: Sets the background color of the incoming call screen.
  • actionColor: Defines the color used for buttons or text in the notification.
  • textColor: Specifies the text color in the full-screen notification.

iOS CallKit customization

Although CallKit customization options are limited by Apple’s framework, the following aspects can be configured:

  • iconName: Specify the app’s icon to display in the CallKit call screen. Ensure the icon is properly prepared and added as described here
  • ringtonePath: Add your custom ringtone file to the root project directory in Xcode at /ios/Runner/Ringtone.caf. Ensure it is included in the Copy Bundle Resources section of Build Phases.
StreamVideo(
    ...,
    pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
        ...,
        pushParams: const StreamVideoPushParams(
            ios: IOSParams(
                iconName: 'IconMask',
                ringtonePath: 'system_ringtone_default',
            ),
      ),
    ),
  );
© Getstream.io, Inc. All Rights Reserved.