Skip to content
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

[ap,android] proper response to methods when using LocalOnlyHostspot #134

Closed
daadu opened this issue Apr 8, 2021 · 11 comments · Fixed by #268
Closed

[ap,android] proper response to methods when using LocalOnlyHostspot #134

daadu opened this issue Apr 8, 2021 · 11 comments · Fixed by #268

Comments

@daadu
Copy link
Member

daadu commented Apr 8, 2021

Methods that needs to be re-worked to send proper response when using LocalOnlyHostspot:

  • getWiFiAPSSID() - get "random SSID" generated for LocalOnlyHostspot
  • getWiFiAPPreSharedKey() - get "random pre shared key" generated for LocalOnlyHostspot
  • isWiFiAPEnabled() - check if LocalOnlyHostspot hotspot is created
  • isSSIDHidden() - get isHiddenSsid forLocalOnlyHostspot
daadu added a commit to mavyfaby/WiFiFlutter that referenced this issue Apr 8, 2021
@daadu
Copy link
Member Author

daadu commented Apr 8, 2021

isSSIDHidden - should return true, if LocalOnlyHostspot is on.

@fedepell
Copy link
Contributor

fedepell commented Apr 8, 2021

@daadu : I believe it should rather return what isHiddenSsid() of SoftApConfiguration that is returned to the onStarted calback. Because I'm not sure it is really hidden as in "doesn't broadcast its SSID" or that it may change from version to version or so.

@daadu
Copy link
Member Author

daadu commented Apr 8, 2021

@fedepell can we request to have "hidden Hostpost" with LocalOnlyHostspot?

@fedepell
Copy link
Contributor

fedepell commented Apr 8, 2021

@daadu : no, with LocalOnlyHotspot as far as I can understand you cannot ask any "details", including SSID being hidden or not. So it's all up to what the OS will generate. Which I don't know how much it may depend on the version (ie. what is valid for 10 may not be valid in the future) or specific vendor.

That's why, in my opinion, using the info from the specific object returned, although slightly more complicated to code, would guarantee a better functionality and longer lifespan of the code.

@mavyfaby
Copy link
Contributor

mavyfaby commented Apr 9, 2021

SoftApConfiguration doesn't support Android SDK 29 as it is introduced in SDK 30.

@daadu
Copy link
Member Author

daadu commented Sep 20, 2021

That's why, in my opinion, using the info from the specific object returned, although slightly more complicated to code, would guarantee a better functionality and longer lifespan of the code.

@fedepell Can you explain this, I did not get WDYM by " using the info from the specific object returned"?

@daadu
Copy link
Member Author

daadu commented Sep 20, 2021

LocalOnlyHotspot is since API 26, and we use it only for >= 29. I assume because the hidden API used for AP works till then, but should enable it for 26+ (instead of current 29+), since it is the official API. If not then we should have flag argument like localOnly: false that enables it for 26+.

@fedepell
Copy link
Contributor

@daadu : what I meant is that we could ask the info from SoftApConfiguration (see link). But as @mavyfaby correctly mentioned, that is available from 30 up, so we could make it work just for >=30

Sad to say but with all these continuous changes in the API support, it is quite hard to be effective and have decently clean code :(

@dirkvranckaert
Copy link

Is there any progress on this? When can we expect a release with this feature?

@daadu
Copy link
Member Author

daadu commented Apr 19, 2022

@dirkvranckaert It is being implemented at #268, do test your app against that PR and give your feedback there.

@daadu
Copy link
Member Author

daadu commented May 17, 2022

This feature has landed on pub.dev with v0.3.16.

@PoloLacoste Thanks for your contribution, check yourself in CONTRIBUTORS.md!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants