-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Wifi SSID to the connection info #37
Comments
Thanks for the request. Just to confirm, are you looking for a way to listen for when the phone connects to a network with a different SSID? If so, this might be something we can add to the If you would like to contribute a PR to add this then that would be amazing. Implementation details |
I am also needing the WIFI SSID and IP to my APP. Is it being developed??? |
@FabioJfa If there are any updates then they will be posted on the relevant issues. Contributions are always welcome |
A package with this functionality exists at https://github.com/pusherman/react-native-network-info. Maybe @pusherman might want to merge it here or at least provide guidance? |
I have a private package for work that interfaces with most of the network info params (ssid, ip address, signal strength, etc.) but currently it's only for Android. I've opened #122 that adds 4 params to the |
I think we would need to request additional permissions and capabilities to get some of this information. On Android, we would need the location permission(coarse or fine) to get information on available SSID's and on iOS we would need Networking Capability Wifi Info. We may already be requesting some of this but if not we'd need to add this to the project. |
I'd love this feature integrated too, but CNCopyCurrentNetworkInfo is going to be deprecated in iOS 13 and there is no replacement to read SSID in sight. So it might be a realistic expectation of Android, but not of iOS. |
Android support added in #122 🎉 |
Apple have altered the use of CNCopyCurrentNetworkInfo in iOS 13 to require one of:
If none of those are present, it'll report a dummy SSID (iOS12-) or null (iOS13+) instead of the real one. It's not actually deprecated, just needs the app to request certain permissions in order to retrieve the real SSID, which could be left up to the react-native app to determine if they need that information and thus need to request permissions/capabilities for it. That being the case, can the possibility of adding this for iOS too please be revisited? |
Describe the Feature
NetInfo.isConnected.addEventListener only works when wifi is turned on/off. I am looking to listen to an event when wifi switches from one network to another. Can anyone have some solutions or any workarounds? Thanks in advance.
Possible Implementations
NetInfo.isConnected.addEventListener("connectionSwitch", listener)
or
NetInfo.isConnected.addEventListener("wifiConnectionSwitch", listener)
The text was updated successfully, but these errors were encountered: