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

Suggestion: bind to WiFi network on lower SDK versions #91

Open
asantana48 opened this issue Nov 12, 2020 · 0 comments
Open

Suggestion: bind to WiFi network on lower SDK versions #91

asantana48 opened this issue Nov 12, 2020 · 0 comments

Comments

@asantana48
Copy link
Contributor

asantana48 commented Nov 12, 2020

At the moment, WifiUtils only binds to WiFi networks on Android 10 so API calls are performed over the specified network. For non-Android 10, it seems sufficient most of the time to disable all other configurations and just enable the configuration we want. However, a coworker (using OnePlus 5T, Android 8.1) has recently reported an issue where sometimes an API call will reach our hardware, but other times will raise a SocketTimeoutException. I'm confident that this is because the call is trying to go through his mobile data since, if he turns it off, they reach the hardware as expected.

Can we bind to WiFi for every SDK level that it's supported? The bindProcessToNetwork call is SDK 23 and even pre-23 we can do setProcessDefaultNetwork(network) I believe.

I've already started work on this, but I thought I would ask what your thoughts are on this and if you would be interested in a PR once I've confirmed that this fixes our issue.

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

No branches or pull requests

1 participant