@amazon-devices/expo-network provides useful information about the device’s network such as its IP address, MAC address, and airplane mode status.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile. -
Reinstall dependencies using the
npm installcommand.
Examples
To test network features, you need to connect to the WiFi on your device shell. ReplaceNETWORK and PASSWORD with your credentials.
API reference
See the documentation page for information about this library and API reference: Official Expo documentation for expo-network.Methods
Known issues and limitations
Network.isAirplaneModeEnabledAsync()- always returns falseNetwork.getNetworkStateAsync()-isInternetReachablefield is always missingNetwork.getNetworkStateAsync()-typefield can only be eitherNONEorWIFI

