# UserControllerBuilder

interface 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

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

Sets the application key associated with the UserController.

build
Link copied to clipboard
abstract fun build(): UserController

Creates the resulting UserController.

callbackHandler
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.

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

Sets the context associated with the UserController.

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

Sets the environment host associated with the UserController.

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

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.

userId
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.