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 NCCallPushConfig in the params object when you call startCall, inviteToCall, or endCall.

Push attribute reference

NCCallPushConfig 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.
iOSConfigNCCallIOSPushConfigiOS-specific settings.
androidConfigNCCallAndroidPushConfigAndroid-specific settings.

NCCallIOSPushConfig 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.

NCCallAndroidPushConfig includes the following fields:

ParameterTypeDescription
channelIdHWstringHuawei notification channel ID.
categoryHWstringHuawei push category.
importanceHWNCCallPushImportanceHWHuawei push importance. Values: NCCallPushImportanceHW.NORMAL and NCCallPushImportanceHW.LOW.
imageUrlHWstringNotification image URL for Huawei push.
channelIdFCMstringFCM notification channel ID.
collapseKeyFCMstringFCM collapse key.
imageUrlFCMstringNotification 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')
.setChannelIdFCM('call_channel_fcm')
.build();

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