Skip to content

sud.onNetworkStatusChange ​

JS
    sud.onNetworkStatusChange(function callback)

Listen for the network status change event

Parameters

  • function callback: Callback function for the network status change event

Parameters of the callback function

  • Object res: Returns the network status change information

Network status change information properties:

PropertyTypeDescription
isConnectedbooleanWhether there is currently a network connection
networkTypestringNetwork type

Valid values of networkType:

ValueDescription
wifiWi-Fi network
2g2G network
3g3G network
4g4G network
5g5G network
unknownUncommon network type on Android
noneNo network