Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant