DeviceState

abstract class DeviceState

Device state information.

Types

ConnectionState
Link copied to clipboard
enum ConnectionState
Connection state.
ConnectionStateCause
Link copied to clipboard
enum ConnectionStateCause
Reason why the device is in the current state.

Functions

canBeConnected
Link copied to clipboard
abstract fun canBeConnected(): Boolean
Tells whether the device can be connected.
canBeDisconnected
Link copied to clipboard
abstract fun canBeDisconnected(): Boolean
Tells whether the device can be disconnected.
canBeForgotten
Link copied to clipboard
abstract fun canBeForgotten(): Boolean
Tells whether the device can be forgotten.
getActiveConnector
Link copied to clipboard
abstract fun getActiveConnector(): DeviceConnector
Gets the currently active connector.
getConnectionState
Link copied to clipboard
abstract fun getConnectionState(): DeviceState.ConnectionState
Gets the device connection state.
getConnectionStateCause
Link copied to clipboard
abstract fun getConnectionStateCause(): DeviceState.ConnectionStateCause
Gets the reason why device is in the current state.
getConnectors
Link copied to clipboard
abstract fun getConnectors(): Array<DeviceConnector>
Gets the list of available connectors for this device.
getShutdownDelay
Link copied to clipboard
@IntRange(from = 0)
abstract fun getShutdownDelay(): Int
Gets the delay before the device shuts down, in milliseconds.