-
Notifications
You must be signed in to change notification settings - Fork 125
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
ANDROID: Timeout parameter on connectToProtectedSSID method #355
ANDROID: Timeout parameter on connectToProtectedSSID method #355
Conversation
@alexma01 Could you give more details about the change in the description of this PR? (example: added a timeout to connectToProtectedSSID for this or that) |
Hi @gustavoabel , i added more details! |
Looks a BREAKING CHANGE for previous users, I was thinking that maybe changes props like onnectToProtectedSSID(
SSID: string,
password: string | null,
options?: {
isWEP?: boolean,
isHidden?: boolean,
timeout?: number | null
}) Soo to avoid breaking change could you make the parameter optional? |
lib/types/index.d.ts
Outdated
*/ | ||
export function connectToProtectedSSID( | ||
SSID: string, | ||
password: string | null, | ||
isWEP: boolean, | ||
isHidden: boolean | ||
isHidden: boolean, | ||
timeout: number | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout: number | null | |
timeout?: number | null |
Hi @JuanSeBestia, |
Yep, but I prefer one breaking change and not many on the future, this days comes now, because #362 is having conflicts with this MR for the same reason. |
Can we continue this way? @alexma01 @JuanSeBestia |
Yep, but I not have too much time free to implement it :( |
Hi guys, so, i added new method "connectToProtectedWifiSSID":
This is to maintain backwards compatibility and also because method overloading doesn't work with the react-native javascript bridge. |
Looks good to me @alexma01 |
Hi, can i have a feedback? Thanks 😁 |
Looks good to me, I don´t know if it works also on android, I didn't see the mapping also on the android part, But I agree with how deal with the issue :) |
Hi @alexma01, has conflicts here. |
1eba7f7
to
e230b99
Compare
Hi @gustavoabel , conflicts resolved. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@JuanSeBestia |
I think yes |
🎉 This PR is included in version 4.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In this PR, a timeout parameter has been added to the connectToProtectedWifiSSID method.
The parameter, as methods are made today, is mandatory. If set to null then by default it will use a 15 second timeout for the connection. The parameter is to be used in seconds and not in milliseconds, the conversion is done in the method.
The timeout was added only for Android, as I didn't encounter any problems on IOS.
This PR was created because, when we try to connect to a network by entering an incorrect password, the ANDROID system takes too long to return a response.