ApplicationState

sealed class ApplicationState

ApplicationState is intended to be used in MobileService.onStateChange method (possibly in when clause). To make its usage consistent, make all the subclasses data class, even SettingsParameterReady and HTTPClientReady may not need the ready parameter. Sample code: when (state) { is ApplicationState.HTTPClientReady -> httpClientReady = state.ready is ApplicationState.AuthenticationChange -> authenticated = state.authenticated ... }

Inheritors

Types

Link copied to clipboard
data class ApplicationInactive(val activeVersions: String?) : ApplicationState

Represents the state when application version is inactive.

Link copied to clipboard
data class ApplicationLock(val locked: Boolean) : ApplicationState

Represents the application lock status, when put into background and timeout, the app is in 'locked' state, when unlocked with the passcode or biometric credentials, the app is in 'unlocked' state.

Link copied to clipboard
data class AuthenticationChange(val authenticated: Boolean) : ApplicationState

Represents the state that a session is successfully established with the server, it will be notified out during both onboarding and restore flows.

Link copied to clipboard

Represents the state that the client policy is retrieved from the server side.

Link copied to clipboard
data class CustomTabsVisibility(val visible: Boolean) : ApplicationState

The CustomTabs visibility state.

Link copied to clipboard

Host app token renewed.

Link copied to clipboard
data class HTTPClientReady(val ready: Boolean = true) : ApplicationState

Represents the state when 'okHttpClient' is set into 'ClientProvider', it will only notified once

Link copied to clipboard
data class NetworkState(val isNetworkAvailable: Boolean) : ApplicationState

Represents the current network state, either network is available, or not

Link copied to clipboard
data class OnFrontChange(val onFront: Boolean) : ApplicationState

Represents the state that the app is brought up to the foreground or put into the background

Link copied to clipboard
data class OnUserSwitch(val newUser: DeviceUser, val oldUser: DeviceUser?) : ApplicationState

Represents the state when user switching happened. This will be used in a multiple user mode app

Link copied to clipboard
data class SettingsParameterReady(val ready: Boolean = true) : ApplicationState

Represents the state when 'SettingsParameter' is set into 'SettingsProvider'.