mobile.connectivity

Returns the type of network available for the mobile device.

Syntax

ui.Interface.frontCall("mobile", "connectivity",
   [], [result] )
  • result - Holds the type of network available.

Usage

The "connectivity" front call checks for the best available mobile network connectivity to the internet.

The returned result string can take one of the following values:

  • "NONE": No connectivity is available to the internet or the specified host.
  • "MobileNetwork": Connectivity is available via the mobile network (Edge, 3G, 4G).
  • "WIFI": Connectivity is available via a WIFI connection.
  • "Undefined network": Network information is not available: Possibly the browser where GBC executes does not provide to API to identify the network type.

On desktop, the front call will return "Undefined network" is it has online access, or "NONE"

Example

DEFINE network STRING
CALL ui.Interface.frontCall("mobile", "connectivity", [], [network] )
IF network == "WIFI" THEN
   ...
END IF