Open pstanton opened 6 years ago
gotta love undocumented features:
try {
WifiManager.isEnabled(function(enabled) {
console.log("WiFi", "isEnabled", enabled);
});
} catch (e) {
console.log("WiFi", "can't isEnabled", e);
}
This is not available for IOS however.
it would be nice to include an "enable wifi" function, or at least an "is wifi enabled" function...
However, when executing connectToProtectedSSID with wifi disabled, I get the following exception:
"Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference"
connectTo RNWifiModule.java:261 connectToProtectedSSID RNWifiModule.java:186