SinchClientBuilder

The SinchClientBuilder class builds a new SinchClient instance. To construct a SinchClient, the required configuration parameters are:

  • Context.

  • Application Key.

  • Environment host.

  • User ID. It is optional to specify

  • Push configuration.

  • Push notification display name.

Functions

Link copied to clipboard
abstract fun applicationKey(applicationKey: String): SinchClientBuilder

Sets the application key associated with the SinchClient.

Link copied to clipboard
abstract fun build(): SinchClient

Creates the resulting SinchClient.

Link copied to clipboard
abstract fun context(context: Context): SinchClientBuilder

Sets the context associated with the SinchClient.

Link copied to clipboard
abstract fun enableVideoCalls(enableVideoCalls: Boolean): SinchClientBuilder

Manages initialization of video calls functionality. By default this functionality is enabled.

Link copied to clipboard
abstract fun environmentHost(environmentHost: String): SinchClientBuilder

Sets the environment host associated with the SinchClient.

Link copied to clipboard
abstract fun pushConfiguration(pushConfiguration: PushConfiguration): SinchClientBuilder

Sets the PushConfiguration to be used to deliver incoming call notifications. Currently Sinch SDK supports FCM and HMS notification providers. To create specific push configuration see FcmPushConfigurationBuilder or HmsPushConfigurationBuilder.

Link copied to clipboard
abstract fun pushNotificationDisplayName(pushNotificationDisplayName: String): SinchClientBuilder

Specify a display name to be used when the Sinch creates a push notification on behalf of the local user (e.g. for an outgoing call). For managed push display name is included in a push notification on a best-effort basis. For example, if the target device has very limited push payload size constraints (e.g iOS 7 can only handle 255 byte push notification payload), then the display name may not be included.

Link copied to clipboard
abstract fun userId(userId: String): SinchClientBuilder

Sets the user id associated with the SinchClient. If the app already has a scheme for user IDs (email addresses, phone numbers, customer numbers, etc.), the same ID could be used when configuring the SinchClient.