Interface UserController
-
- All Implemented Interfaces:
public interface UserControllerA
UserControllermanages registration of user and respective FCM and MHS push data for Sinch Managed Push functionality. UseUserControlleras 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
UserControlleris instantiated on.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classUserController.Companion
-
Method Summary
Modifier and Type Method Description abstract UnitregisterUser(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. abstract UnitunregisterPushToken(PushTokenUnregistrationCallback pushTokenUnregistrationCallback)Unregisters any push token that has been registered for Sinch Managed Push (for the User Id that this instance is bound to). abstract UnitsetSinchLogCallback(SinchLogCallback sinchLogCallback)Sets the SinchLogCallback to be notified about log messages from the Sinch SDK. -
-
Method Detail
-
registerUser
abstract Unit 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.
First UserRegistrationCallback callbacks are fired to either request needed credentials or to report success / failure of the registration.
Then push token registration process is initiated. After that PushTokenRegistrationCallback are fired to report success / failure.
- Parameters:
userRegistrationCallback- Callback for the user registration events.pushTokenRegistrationCallback- Callback for push token registration events.
-
unregisterPushToken
abstract Unit 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).
- Parameters:
pushTokenUnregistrationCallback- Callback for push token unregistration events.
-
setSinchLogCallback
abstract Unit 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.
- Parameters:
sinchLogCallback- to be notified about log messages or null to remove any previously set callback.
-
-
-
-