Skip to main content

Configure push settings

The current Android public API accepts push settings in these scenarios:

  • startCall(List<String>, NCCallType, NCCallMediaType, INCCallPushConfig, String)
  • inviteToCall(List<String>, INCCallPushConfig, String)
  • endCall(String, INCCallPushConfig)

Top-level fields

INCCallPushConfig defines these fields:

FieldDescription
disablePushTitleWhether to hide the push title.
pushTitlePush title.
pushContentPush body.
templateIdPush template ID.
androidConfigAndroid-specific push settings.
iOSConfigiOS-specific push settings.

Android-specific settings

In the current code snapshot, INCCallAndroidPushConfig exposes these fields:

FieldDescription
channelIdHWHuawei Push channelId.
imageUrlHWImage URL for Huawei notifications.
importanceHWHuawei notification importance. Uses NCCallPushImportanceHW.
categoryHWHuawei notification category.
channelIdFCMFCM channel ID.
fcmCollapseKeyFCM collapse key.
fcmImageUrlImage URL for FCM notifications.

iOS-specific settings

In the current code snapshot, INCCallIOSPushConfig exposes these fields:

FieldDescription
threadIdAPNs thread ID for notification grouping.
apnsCollapseIdAPNs collapse ID.
richMediaUriRich media URI.

Construction pattern in the current code snapshot

The Android nexconncall module currently exposes the abstract INCCallPushConfig interface, but this repository does not expose a concrete INCCallPushConfig.Builder implementation. In the current snapshot, the verifiable pattern is:

  1. Build the underlying RCCallPlusPushConfig.
  2. Wrap it with CallPushConfigImpl as INCCallPushConfig.
Java
RCCallPlusAndroidPushConfig androidConfig =
RCCallPlusAndroidPushConfig.Builder.create()
.setChannelIdHW("hw-channel")
.setCategoryHW("VOIP")
.build();

RCCallPlusIOSPushConfig iosConfig =
RCCallPlusIOSPushConfig.Builder.create()
.setThreadId("thread-id")
.setApnsCollapseId("collapse-id")
.build();

RCCallPlusPushConfig legacyPushConfig =
RCCallPlusPushConfig.Builder.create()
.setPushTitle("Call invitation")
.setPushContent("You have a new audio or video call")
.setAndroidConfig(androidConfig)
.setIOSConfig(iosConfig)
.build();

INCCallPushConfig pushConfig = new CallPushConfigImpl(legacyPushConfig);

NCCallEngine.getInstance().startCall(
Collections.singletonList("remoteUserId"),
NCCallType.SINGLE,
NCCallMediaType.VIDEO,
pushConfig,
"business-extra"
);