-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat(wifi_iot): proper response to methods when using LocalOnlyHostspot #268
Conversation
remove deprecated annotation
@PoloLacoste Thanks for the contribution. I haven't reviewed and tested it properly, but can you also make necessary changes in plugin README as well. I think this features are for >=29? right? while the "hidden AP" API is used only for <=26 - therefore for 27-28 version - there is no API for get these details? right? |
|
On this link the documentation says its only from API level >= 30 and up. |
Yes, to get if the SSID is hidden there is no API to get this information for API 27 to 29 :/ |
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.
Can we pollyfill getWiFiAPState
as well? - that returns one of these 3 - WIFI_AP_STATE_DISABLED
, WIFI_AP_STATE_ENABLED
, WIFI_AP_STATE_FAILED
(failed if the last attempted setWiFiAPEnabled(true)
failed - we can cache these in some var in LocalOnlyHotspotCallback.onFailed
callback - reset these var back before new attempt to start AP)
packages/wifi_iot/android/src/main/java/com/alternadom/wifiiot/WifiIotPlugin.java
Outdated
Show resolved
Hide resolved
@PoloLacoste I have reviewed the PR, Thanks for the contribution. I have a few ideas (mentioned above) that could still improve it, let me know what you think. It would be great if included in this PR or if you are done/tired with this then I could create feature request issues regarding it so that could be picked up in future. Just let me know - waiting for your response! Regards. |
- return true for isSSIDHidden for SDK 27 to 29 (with a warning log)
packages/wifi_iot/android/src/main/java/com/alternadom/wifiiot/WifiIotPlugin.java
Outdated
Show resolved
Hide resolved
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.
@PoloLacoste add null
check for apReservation.getWifiConfiguration()
(all places), and return appropriate error.
Returns the
WifiConfiguration
of the current Local Only Hotspot (LOHS). May be null if hotspot enabled and security type is notWifiConfiguration.KeyMgmt.None
orWifiConfiguration.KeyMgmt.WPA2_PSK
.
@PoloLacoste Can you fix the build fail in CI |
packages/wifi_iot/android/src/main/java/com/alternadom/wifiiot/WifiIotPlugin.java
Outdated
Show resolved
Hide resolved
make sure to return only one error or one success
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.
@PoloLacoste Thanks for your contribution on it. |
fix #134