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

Android 8+ scan throttle #54

Open
oykenfurkan opened this issue Oct 11, 2019 · 6 comments
Open

Android 8+ scan throttle #54

oykenfurkan opened this issue Oct 11, 2019 · 6 comments

Comments

@oykenfurkan
Copy link

After version 8.0 Android started apply limitations to the frequency of scans using. The new limitations are;

Android 8.0 and Android 8.1:

Each background app can scan one time in a 30-minute period.

Android 9:

Each foreground app can scan four times in a 2-minute period. This allows for a burst of scans in a short time.

All background apps combined can scan one time in a 30-minute period.

https://developer.android.com/guide/topics/connectivity/wifi-scan

According to these the sample application is failed to update the values after 4 scans.

@pwittchen
Copy link
Owner

It's good to know. Due to this update, library will no longer work on the newest Android versions. The only reasonable fix I see right now, is to add limitation for scan with these periods for the newest Android versions.

@pwittchen
Copy link
Owner

pwittchen commented Oct 17, 2019

I think alternative way to solve that issue may be creating the separate library, which can use new RTT API. I had this idea some time ago, but I haven't executed it yet :-).

@oykenfurkan
Copy link
Author

RTT API would be a great idea. But it is just too new yet and Android is restricted Wi-Fi scanning to early in my opinion.

@pwittchen
Copy link
Owner

Yeah. As a regular developers we cannot do much about it. We can simply adjust to the Google/Android API and Guidelines.

@juicycool92
Copy link

So i heard you preparing to release new version or new library at latest thread, thats awseome!
but before we wait for new library or version, id like to stop scanning when its throttled.
is there any way i can detect status of Failed to start scan and do another strategy?

Thanks!

@pwittchen
Copy link
Owner

is there any way i can detect status of Failed to start scan and do another strategy?

I'm not sure if it's possible to detect such situation. We can just send request for scan and wait for the results.

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

3 participants