# UserController

interface UserController

A `UserController` manages registration of user and respective FCM and MHS push data for Sinch Managed Push functionality. Use `UserController` as a lightweight tool that allows to register user for incoming calls via Managed Push functionality without a necessity to start SinchClient. When PushTokenRegistrationCallback.onPushTokenRegistered is called, you can be sure, that incoming calls will be received via FCM or HMS push notifications and you are free to close or terminate application if desired.

Note: The callbacks will be by default invoked on the same thread as the `UserController` is instantiated on.

## Types

Companion
Link copied to clipboard
object Companion

## Functions

registerUser
Link copied to clipboard
abstract fun registerUser(userRegistrationCallback: UserRegistrationCallback, pushTokenRegistrationCallback: PushTokenRegistrationCallback)

Registers user and associated FCM or HMS Push Token for the Sinch Managed Push to allow receiving incoming calls via push for the specified user on this very device.

setSinchLogCallback
Link copied to clipboard
abstract fun setSinchLogCallback(sinchLogCallback: SinchLogCallback?)

Sets the SinchLogCallback to be notified about log messages from the Sinch SDK. This callback will be active until you create SinchClient. Then, all the logging will be exposed via SinchClientListener.onLogMessage callback.

unregisterPushToken
Link copied to clipboard
abstract fun unregisterPushToken(pushTokenUnregistrationCallback: PushTokenUnregistrationCallback)

Unregisters any push token that has been registered for Sinch Managed Push (for the User Id that this instance is bound to).