react-native-wifi-connect
Interconnect WiFi
Installation
yarn add react-native-wifi-connect
Usage
import {
hotspot,
connect,
wifiSwitch,
isWifiOn,
} from 'react-native-wifi-connect';
To switch wifi state
wifiSwitch();
To create temporary hotspot with no internet capabilities
Returns temp ssid and passphrase separated by #.
hotspot().then((ssid_pass: String) => {
console.info(ssid_pass);
});
Connect to other wifi network
connect(ssid: String, pass: String);
To check id wifi is on
isWifiOn().then((b: boolean) => {
if (b) {
console.log('Yes');
} else {
console.log('No');
}
});
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT