This API enables to check the network status of the devices in order to have more information to take some actions. This API is often used in Offline Native Mobile applications to determinate the best moment to perform a synchronization.
This API is componed by domains, properties and methods.
This domain is defined in order to identify the device's connection type.
It is based on Numeric(1) with the following enumerated values:
Name |
Description |
Value |
None |
None |
0 |
Wifi |
Wifi |
1 |
WAN |
WAN |
2 |
It is a read-only property set automatically with the ServiceURL property of the Smart Devices Generator.
The property is then used by several methods explained below.
Returns true or false depending if the device can access the specified server. It checks if a package can be routed to the desired URL host; notice that no request is done to the current host.
The server can be passed as an optional parameter by its URL. If the URL parameter is not present then the method will check connection to the server url of the property ApplicationServerURL.
Name |
Type |
Description |
URL (optional) |
Character(200) |
URL of a specific server to which the devices has to check for access. |
Type |
Description |
Boolean |
True or false whether the server is available or not. |
It gets the connection type the device has to a specific server. There are some servers which are only accessed by Local Networks, so even though the device has internet connection they may not have access to the server
Name |
Type |
Description |
URL (optional) |
Character(200) |
URL of a specific server to which the device is trying to connect. |
Type |
Descripcion |
NetworkAPIConnectionType |
One of the enumeration types of this domain which will be the connection type of the device to a specific server. |
Returns true or false whether the connection between the device and the server could cause a monetary cost to the device user
Name |
Type |
Description |
URL (optional) |
Character(200) |
URL of a specific server to which the device is trying to connect. |
Type |
Descripcion |
Boolean |
Returns true or false if the network connection could cause a monetary cost to the device user |