sinch-rtc

# SinchClientListener

interface SinchClientListener : UserRegistrationCallback, PushTokenRegistrationCallback, PushTokenUnregistrationCallback, SinchLogCallback

A SinchClientListener handles client state changes and the optional log method allows the listener to log messages from the underlying calling functionality.

NOTE: The listener will be called on the same thread as the SinchClient is instantiated on.

## Functions

onClientFailed
Link copied to clipboard
abstract fun onClientFailed(client: SinchClient, error: SinchError)

Tells the listener that there was an error in the SinchClient.

onClientStarted
Link copied to clipboard
abstract fun onClientStarted(client: SinchClient)

Tells the listener that the client has started and ready for initiating outgoing calls.

onCredentialsRequired
Link copied to clipboard
abstract fun onCredentialsRequired(clientRegistration: ClientRegistration)

Called when SDK needs to verify user's identity within your application. See Authentication $ Authorization (https://developers.sinch .com/docs/in-app-calling/android/application-authentication/) section of the online docs for more information about the flow.

onLogMessage
Link copied to clipboard
open fun onLogMessage(level: Int, area: String, message: String)
open fun onLogMessage(level: Int, area: String, message: String, throwable: Throwable?)

Optional method for handling log messages from the Sinch SDK.

onPushTokenRegistered
Link copied to clipboard
abstract fun onPushTokenRegistered()

Informs that the push token has been successfully registered on backend and the application is ready to receive incoming calls via push notification.

onPushTokenRegistrationFailed
Link copied to clipboard
abstract fun onPushTokenRegistrationFailed(error: SinchError)

Informs that the push token registration failed and the application will not be able to receive incoming calls via push notification.

onPushTokenUnregistered
Link copied to clipboard
abstract fun onPushTokenUnregistered()

Informs that the push token has been successfully unregistered on backend and the application will not receive incoming calls via push notifications anymore.

onPushTokenUnregistrationFailed
Link copied to clipboard
abstract fun onPushTokenUnregistrationFailed(error: SinchError)

Informs that the push token unregistration failed

onUserRegistered
Link copied to clipboard
abstract fun onUserRegistered()

Informs that user has been successfully registered.

onUserRegistrationFailed
Link copied to clipboard
abstract fun onUserRegistrationFailed(error: SinchError)

Informs that user registration has failed and Sinch SDK will not function properly.