Gets the device's current network connection state.
On web, navigator.connection.type is not available on browsers. So if there is an active network connection, the field type returns NetworkStateType.UNKNOWN. Otherwise, it returns NetworkStateType.NONE.
A Promise that resolves to an object with the following fields:
type (NetworkStateType) -- a NetworkStateType enum value that represents the current network connection type.
isConnected (boolean) -- if there is an active network connection. Note that this does not mean that internet is reachable. This field is false if the type is either Network.NetworkStateType.NONE or Network.NetworkStateType.UNKNOWN, true otherwise.
isInternetReachable (boolean) -- if the internet is reachable with the currently active network connection. On Android, this depends on NetInfo.isConnected() (API level < 29) or ConnectivityManager.getActiveNetwork() (API level >= 29). On iOS, this value will always be the same as isConnected.
interfaceName (string | null) -- A string representing interface name (eth0, wlan0) or null (default), meaning the method should fetch the MAC address of the first available interface. (On iOS this argument is ignored.)