Interface SinchClientBuilder
-
- All Implemented Interfaces:
public interface SinchClientBuilderThe 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.
-
-
Method Summary
Modifier and Type Method Description abstract SinchClientBuildercontext(Context context)Sets the context associated with the SinchClient. abstract SinchClientBuilderuserId(String userId)Sets the user id associated with the SinchClient. abstract SinchClientBuilderapplicationKey(String applicationKey)Sets the application key associated with the SinchClient. abstract SinchClientBuilderenvironmentHost(String environmentHost)Sets the environment host associated with the SinchClient. abstract SinchClientBuilderenableVideoCalls(Boolean enableVideoCalls)Manages initialization of video calls functionality. abstract SinchClientBuilderpushConfiguration(PushConfiguration pushConfiguration)Sets the PushConfiguration to be used to deliver incoming call notifications. abstract SinchClientBuilderpushNotificationDisplayName(String pushNotificationDisplayName)Specify a display name to be used when the Sinch creates a push notification on behalf of the local user (e.g. abstract SinchClientBuildercallbackHandler(Handler callbackHandler)Sets the callback handler to be used for all Sinch callbacks. abstract SinchClientbuild()Creates the resulting SinchClient. -
-
Method Detail
-
context
abstract SinchClientBuilder context(Context context)
Sets the context associated with the SinchClient.
- Parameters:
context- Context instance bound to the SinchClient.
-
userId
abstract SinchClientBuilder userId(String userId)
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.
- Parameters:
userId- User identifier associated with this SinchClient.
-
applicationKey
abstract SinchClientBuilder applicationKey(String applicationKey)
Sets the application key associated with the SinchClient.
- Parameters:
applicationKey- Application key copied from your Sinch dashboard.
-
environmentHost
abstract SinchClientBuilder environmentHost(String environmentHost)
Sets the environment host associated with the SinchClient.
- Parameters:
environmentHost- Environment host associated with the SinchClient.
-
enableVideoCalls
abstract SinchClientBuilder enableVideoCalls(Boolean enableVideoCalls)
Manages initialization of video calls functionality. By default this functionality is enabled.
- Parameters:
enableVideoCalls- Indicates if video calling functionalities should be initialized.
-
pushConfiguration
abstract SinchClientBuilder pushConfiguration(PushConfiguration pushConfiguration)
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.
- Parameters:
pushConfiguration- Push configuration to be used to deliver incoming notifications.
-
pushNotificationDisplayName
abstract SinchClientBuilder pushNotificationDisplayName(String pushNotificationDisplayName)
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.
- Parameters:
pushNotificationDisplayName- Display name may at most be 255 bytes (UTF-8 encoded) long.
-
callbackHandler
abstract SinchClientBuilder callbackHandler(Handler callbackHandler)
Sets the callback handler to be used for all Sinch callbacks. The SinchClient will emit its callbacks on the thread associated with the provided handler. By default, the SinchClient uses the thread on which the builder was created.
- Parameters:
callbackHandler- The handler to be used for SinchClient callbacks.
-
build
abstract SinchClient build()
Creates the resulting SinchClient.
-
-
-
-