Skip to main content

Configure push attributes

Call SDK supports custom push behavior for signaling messages generated by calls. For example, you can:

  • Customize the push notification title
  • Customize the push notification content
  • Customize the notification icon
  • Configure other APNs or Android push channel attributes

Provide INCCallPushConfig when you call startCall, inviteToCall, acceptCall, or endCall.

Push attribute reference

INCCallPushConfig includes the following fields:

ParameterTypeDescription
pushTitlestringPush notification title. This field is part of the current public type definition.
pushContentstringPush notification content.
disablePushTitlebooleanWhether to suppress the notification title. This field applies only when the target user is on iOS.
templateIdstringPush template ID.
iOSConfigINCCallIOSPushConfigiOS-specific settings.
androidConfigINCCallAndroidPushConfigAndroid-specific settings.

INCCallIOSPushConfig includes the following fields:

ParameterTypeDescription
threadIdstringNotification thread identifier used for grouping on iOS.
apnsCollapseIdstringAPNs collapse identifier used to replace previous notifications with the same value.
richMediaUristringURI associated with the iOS rich media category.

INCCallAndroidPushConfig includes the following fields:

ParameterTypeDescription
channelIdHWstringHuawei notification channel ID.
categoryHWstringHuawei push category.
importanceHW'NORMAL' | 'LOW'Huawei push importance.
imageUrlHWstringNotification image URL for Huawei push.
fcmChannelIdstringFCM notification channel ID.
fcmCollapseKeystringFCM collapse key.
fcmImageUrlstringNotification image URL for FCM push.

To build the Android-specific object, use createAndroidPushConfigBuilder() on NCCallEngine:

typescript
const androidConfig = ncCallEngine
.createAndroidPushConfigBuilder()
.setChannelIdHW('call_channel_hw')
.setCategoryHW('VOIP')
.setFcmChannelId('call_channel_fcm')
.build();

const pushConfig: INCCallPushConfig = {
pushTitle: 'Incoming call',
pushContent: 'Alice is calling',
iOSConfig: {
threadId: 'call-thread',
},
androidConfig,
};