# Companion

object Companion

## Properties

analyticReporter
Link copied to clipboard
@JvmStatic
var analyticReporter: AnalyticReporter?
chatManager
Link copied to clipboard
@JvmStatic
lateinit var chatManager: ChatManager

The chat manager instance. Is available when the client is configured and the user is logged in.

client
Link copied to clipboard
@JvmStatic
lateinit var client: SippoClient

The Sippo client instance.

contextInfo
Link copied to clipboard
@JvmStatic
lateinit var contextInfo: ContextInfo
hostMetaFile
Link copied to clipboard
@JvmStatic
lateinit var hostMetaFile: HostMetaFile

The host meta file to access AuthUrl and WebUrl.

isInitialized
Link copied to clipboard
@JvmStatic
val isInitialized: Boolean

Whether the Sippo client instance has been successfully initialized.

sessionManager
Link copied to clipboard
@JvmStatic
lateinit var sessionManager: SessionManager

The session manager instance. Is available when the client is configured.

## Functions

configure
Link copied to clipboard
@JvmStatic
fun configure(context: Context, serverUrl: URL, contextInfo: ContextInfo, logger: SippoLogger = SippoLogger.Builder().build(), onCompletion: (SippoResourceError?) -> Unit)

Creates and configures a new Sippo client instance. If another instance exists, it will continue alive until an explicit logout is made. Also, after an explicit logout, the current instance is no longer valid and a new one needs to be configured.

configureRTC
Link copied to clipboard
@JvmStatic
fun configureRTC(context: Context)

Configures the WebRTC protocol used for VoIP features. It should be called once during the application lifecycle.

dispatchMetrics
Link copied to clipboard
fun <TRACE : BaseTrace<out Enum<*>, METRICS>, METRICS : AnalyticEvent> dispatchMetrics(holder: TraceHolder<TRACE, METRICS>?, status: Status): METRICS?
hasConnectivityObserver
Link copied to clipboard
fun hasConnectivityObserver(): Boolean

Indicates whether the connectivityObserver has been initialized.

refreshConnectivityObserver
Link copied to clipboard
fun refreshConnectivityObserver()

Forces the connectivity observer to refresh the current network list and re-check the connectivity against the configured host.

requireClient
Link copied to clipboard
fun requireClient(): SippoClient

Returns the configured SippoClient instance.

unregisterConnectivityObserver
Link copied to clipboard
fun unregisterConnectivityObserver()

Unregisters the connectivity observer from the system's NetworkCallback and disposes any pending resolution operation.