The object provides information about the state of the network connection. It is updated automatically as the value changes on the device.
The object's value is cached by the JavaScript.
The object can be accessed using the launchbox.Container.networkStatus
reference.
Name | Description |
---|---|
type | The type of the connection available. The property can take one of the following values: wifi, 2G, 3G, 4G, none, unknown. If there is no connection present, it will take the value of "none". If the connection is unknown, it will take the value of "unknown". |
On iOS, the public API does not return a specific network type information, therefore all GSM networks return the "3G" value.
Name | Description | Return type |
---|---|---|
addListener | Adds a connection type listener to the list of listeners. |
undefined |
removeListener | Removes a connection type listener from the list of listeners. |
undefined |