blackdeve / react-native-wifi

A react-native implementation for viewing and connecting to Wifi networks on Android and iOS devices.
76 stars 89 forks source link

Error callback doesn't execute #16

Open AndrelsFlor opened 5 years ago

AndrelsFlor commented 5 years ago

Hello, i'm on MIUI 9.6.2(Android 7.1.2) and, as the title says, i can't get the error callback to execute. Even when i put in the wrong password for the network, i get the success message.

this is the function i'm executing:

async connectToWifi(ssid, password) {
      console.log('SSID', ssid)
      console.log('PASSWORD', password)
      this.setState({status: 4})
      WifiManager.connectToProtectedSSID(ssid, password, false)
          .then(() => {
              console.log('Connected successfully!')
          }, () => {
              console.log('Connection failed!')
          })

  }
bntzio commented 5 years ago

+1

RenderCoder commented 5 years ago

same problem, is there a bug?