UserControllerBuilder

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

  • Context.

  • Application Key.

  • Environment host.

  • User ID. It is optional to specify

  • Push configuration.

  • Callback handler.

Functions

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

Sets the application key associated with the UserController.

Link copied to clipboard
abstract fun build(): UserController

Creates the resulting UserController.

Link copied to clipboard
abstract fun callbackHandler(callbackHandler: CallbackHandler): UserControllerBuilder

Sets the callback handler (on a thread with a looper) the UserController will post callbacks on.

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

Sets the context associated with the UserController.

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

Sets the environment host associated with the UserController.

Link copied to clipboard

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 userId(userId: String): UserControllerBuilder

Sets the user id associated with the UserController. 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 UserController.