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:
| 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 | INCCallIOSPushConfig | iOS-specific settings. |
| androidConfig | INCCallAndroidPushConfig | Android-specific settings. |
INCCallIOSPushConfig 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. |
INCCallAndroidPushConfig includes the following fields:
| Parameter | Type | Description |
|---|---|---|
| channelIdHW | string | Huawei notification channel ID. |
| categoryHW | string | Huawei push category. |
| importanceHW | 'NORMAL' | 'LOW' | Huawei push importance. |
| imageUrlHW | string | Notification image URL for Huawei push. |
| fcmChannelId | string | FCM notification channel ID. |
| fcmCollapseKey | string | FCM collapse key. |
| fcmImageUrl | 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')
.setFcmChannelId('call_channel_fcm')
.build();
const pushConfig: INCCallPushConfig = {
pushTitle: 'Incoming call',
pushContent: 'Alice is calling',
iOSConfig: {
threadId: 'call-thread',
},
androidConfig,
};