Skip to main content

getNetworkType

Description

Get information about network type

Parameters

N/A

Return Value

ParamData typeDescription
networkTypestringType 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"
}
}