react-native-android-wifi
A react-native module for viewing and connecting to Wifi networks on Android devices.
Installation
Add it to your android project
Install the native dependencies
Use react-native link to install native dependencies automatically:
or do it manually as described here.
Example usage
Permissions: Starting with Android API 25, apps must be granted the ACCESS_COARSE_LOCATION (or ACCESS_FINE_LOCATION) permission in order to obtain results.
Wifi connectivity status:
Enable/Disable wifi service:
Sign device into a specific network:
This method doesn't have a callback when connection succeeded, check this issue.
Disconnect current wifi network
Get current SSID
Get current BSSID
Get all wifi networks in range
connectionStatus returns true or false depending on whether device is connected to wifi
Get connected wifi signal strength
Get connected wifi frequency
Get current IP
Remove/Forget the Wifi network from mobile by SSID, returns boolean
Starts native Android wifi network scanning and returns list
Method to force wifi usage. Android by default sends all requests via mobile data if the connected wifi has no internet connection.