Version: 0.0.2

Orb Response

When you call observe() method, Orb will return an OrbResponse object (accessible by a keyword it by default) when each time Orb detecting a network change events in the device.

This object holds some properties as follows:

PropertyValue TypeDefault ValueInformation
stateOrbStateOrbState.UNKNOWNCurrent network state of the device
typeOrbTypeOrbType.UNKNOWNCurrent network type of the device
errorMessageStringnullThe message when error happened in Orb process

The OrbState

OrbState is an enum class, that will help you determine the current network state of the device. The enum class hold some constant as follows:

NameInformation
OrbState.UNKNOWNOrb can't determine the current network state of the device
OrbState.CONNECTEDThe device is connected to a network
OrbState.DISCONNECTEDThe device is disconnected from network

The OrbType

To determine the type of network currently connected to the device is by using OrbType. This is an enum class that hold some constant as follows:

NameSupported APIInformation
OrbType.UNKNOWN16+Orb can't determine the current network type of the device
OrbType.BLUETOOTH16+The device is connected to a Bluetooth network
OrbType.CELULLAR16+The device is connected to a Celullar network
OrbType.ETHERNET16+The device is connected to a Ethernet network
OrbType.LOWPAN21+The device is connected to a LoWPAN network
OrbType.VPN16+The device is connected to a VPN network
OrbType.WIFI16+The device is connected to a Wi-Fi network
OrbType.WIFI_AWARE21+The device is connected to a Wi-Fi Aware network