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

Wifi lock hasn't been working since Android 10 #222

Closed
Xavron opened this issue Feb 4, 2024 · 1 comment
Closed

Wifi lock hasn't been working since Android 10 #222

Xavron opened this issue Feb 4, 2024 · 1 comment

Comments

@Xavron
Copy link

Xavron commented Feb 4, 2024

The problem:

Android Studio lint checks or whatever doesn't mark it. I accidentally noticed instead.

wifiLock = manager.createWifiLock(TAG);

https://developer.android.com/reference/android/net/wifi/WifiManager#createWifiLock(java.lang.String)

"This method was deprecated in API level 29.
This API is non-functional. "

What should be done:

A. Continue not to use it

B. https://developer.android.com/reference/android/net/wifi/WifiManager#createWifiLock(int,%20java.lang.String)

"public WifiManager.WifiLock createWifiLock (int lockType, String tag)"

lockType WIFI_MODE_FULL_LOW_LATENCY is forced in Android 14+.

Impacts:

Somewhat tested and its whatever. A special condition thing whatever that condition might be. I find it better to have it tied to an advanced setting (something I will eventually push out in a pull request) and keep it there if someone finds a reason for it to exist here.

Notes:

On Android 14, according to the docs, the WIFI_MODE_FULL_LOW_LATENCY only takes affect with the display on and app visible. Otherwise, the info is lacking or not clear on what exactly happens if those conditions are not met.

@Xavron
Copy link
Author

Xavron commented Apr 27, 2024

Closing as should be fixed with pull request: #229

(Not really tested but is expected to work.)

@Xavron Xavron closed this as completed Apr 27, 2024
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