getNetworkType
Description
Get information about network type
Parameters
N/A
Return Value
| Param | Data type | Description |
|---|---|---|
| networkType | string | Type of network. Value is 'wifi' or 'cellular' or 'none' |
Error Code
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.Device.getNetworkType()
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{
"status": "success",
"data": {
"networkType": "wifi"
}
}