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:
| Parameter | Type | Description |
|---|---|---|
| pushTitle | string | Push notification title. This field is part of the current public type definition. |
| pushContent | string | Push notification content. |
| disablePushTitle | boolean | Whether to suppress the notification title. This field applies only when the target user is on iOS. |
| templateId | string | Push template ID. |
| iOSConfig | NCCallIOSPushConfig | iOS-specific settings. |
| androidConfig | NCCallAndroidPushConfig | Android-specific settings. |
NCCallIOSPushConfig includes the following fields:
| Parameter | Type | Description |
|---|---|---|
| threadId | string | Notification thread identifier used for grouping on iOS. |
| apnsCollapseId | string | APNs collapse identifier used to replace previous notifications with the same value. |
| richMediaUri | string | URI associated with the iOS rich media category. |
NCCallAndroidPushConfig includes the following fields:
| Parameter | Type | Description |
|---|---|---|
| channelIdHW | string | Huawei notification channel ID. |
| categoryHW | string | Huawei push category. |
| importanceHW | NCCallPushImportanceHW | Huawei push importance. Values: NCCallPushImportanceHW.NORMAL and NCCallPushImportanceHW.LOW. |
| imageUrlHW | string | Notification image URL for Huawei push. |
| channelIdFCM | string | FCM notification channel ID. |
| collapseKeyFCM | string | FCM collapse key. |
| imageUrlFCM | string | Notification 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,
};