react-native-wifi-manager icon indicating copy to clipboard operation
react-native-wifi-manager copied to clipboard

Connect callback

Open javorosas opened this issue 9 years ago • 2 comments

Hi there!

First of all, great work. I find this library really useful. I just want to know how can I get a success of fail callback (or even better, a promise) as a result from calling the connect method.

The README says I should listen to connection status, but the status method is not something that can listened to. It won't fire a callback every time the status changes, it just checks the current status. And I don't see a way to catch the connection errors, e.g. when you connect to an SSID that's not there, or the password was wrong.

Thanks.

javorosas avatar Nov 27 '16 00:11 javorosas

Hey, sorry for the the delay. I unfortunately haven't been maintaining this project lately. Have you looked at this (https://github.com/devstepbcn/react-native-android-wifi)? It appears to look very similar to this project but actually provides a status on the attempted connection.

skierkowski avatar Dec 19 '16 19:12 skierkowski

Hi, Thanks for your response. I ended up writing my own library (forked from yours) and I'm actually really happy with my implementation. Feel free to take a look if you want/need: https://github.com/javorosas/react-native-open-wifi.

Your code was really helpful. Thanks.

javorosas avatar Dec 19 '16 20:12 javorosas