Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / DatasyncState

DatasyncState

data class DatasyncState

Represents some state indicators about a DatasyncService instance.

Such a state must be read using the DatasyncManager.subscribeToStateChange method on any DatasyncManager instance of the targeted DatasyncService.

Types

ConnectionState

sealed class ConnectionState

Represents the state of the real-time connection (web-socket) of a DatasyncService to the Webcom back end.

Constructors

<init>

DatasyncState(isReachable: Boolean, connectionState: DatasyncState.ConnectionState, authenticationState: AuthenticationEvent.AuthenticationState)

Represents some state indicators about a DatasyncService instance.

Properties

authenticationState

val authenticationState: AuthenticationEvent.AuthenticationState

State of the user authentication maintained on the real time connection (web-socket) of the DatasyncService to the Webcom back end. If the connection is in the ConnectionState.Disconnected state, this indicates the authentication state that will be restored when the connection will be re-established.

connectionState

val connectionState: DatasyncState.ConnectionState

State of the real time connection (web-socket) of the DatasyncService to the Webcom back end.

isReachable

val isReachable: Boolean

true if and only if the running device has network connectivity

Functions

isAuthenticated

fun isAuthenticated(): Boolean

Indicates whether a user is actually authenticated on the real time connection to the Webcom back end.

isConnected

fun isConnected(): Boolean

Indicates whether the real time connection to the Webcom back end is established.