ClientState

interface ClientState

The current state of the SDK. With this class you can get the current user, the connection state, initialization state...

Properties

Link copied to clipboard
abstract val connectionState: StateFlow<ConnectionState>

StateFlow that indicates if we are currently online, connecting of offline.

Link copied to clipboard
abstract val initializationState: StateFlow<InitializationState>

The state of the initialization process of the SDK.

Link copied to clipboard
abstract val isConnecting: Boolean

If connection is in connecting state.

Link copied to clipboard

If internet is available or not. This is not related to the connection of the SDK, it returns if internet is available in the device.

Link copied to clipboard
abstract val isOffline: Boolean

If the WebSocket is disconnected.

Link copied to clipboard
abstract val isOnline: Boolean

If the WebSocket is connected.

Link copied to clipboard
abstract val user: StateFlow<User?>

The current user if connected.