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) -- A string representing interface name (eth0, wlan0) or null, meaning the method should fetch the MAC address of the first available interface. (On iOS this argument is ignored.) If undefined interface name passed in, the method would reject the promise with corresponding message.
A Promise that resolves to a string of the network adapter MAC address or null if there's no such address matching the interface. On web, the Promise resolves to null.
Note from Apple: In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value "02:00:00:00:00:00".
If you need to identify the device, use the getIosIdForVendorAsync() method of the expo-application unimodule instead.