Interface ClientState
-
- All Implemented Interfaces:
public interface ClientStateThe current state of the SDK. With this class you can get the current user, the connection state, initialization state...
-
-
Method Summary
Modifier and Type Method Description abstract StateFlow<InitializationState>getInitializationState()The state of the initialization process of the SDK. abstract StateFlow<User>getUser()The current user if connected. abstract StateFlow<ConnectionState>getConnectionState()StateFlow<ConnectionState> that indicates if we are currently online, connecting of offline. abstract BooleanisOnline()If the WebSocket is connected. abstract BooleanisOffline()If the WebSocket is disconnected. abstract BooleanisConnecting()If connection is in connecting state. abstract BooleanisNetworkAvailable()If internet is available or not. -
-
Method Detail
-
getInitializationState
abstract StateFlow<InitializationState> getInitializationState()
The state of the initialization process of the SDK.
-
getUser
abstract StateFlow<User> getUser()
The current user if connected.
-
getConnectionState
abstract StateFlow<ConnectionState> getConnectionState()
StateFlow<ConnectionState> that indicates if we are currently online, connecting of offline.
-
isConnecting
abstract Boolean isConnecting()
If connection is in connecting state.
-
isNetworkAvailable
abstract Boolean isNetworkAvailable()
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.
-
-
-
-