Android 9 (Pie) introduces wifi RTT ranging for the purpose of wifi-based gelolocation.
In versions up until Android 8 (Oreo), applications would periodically request wifi scans. This functionality is being massively throttled in Android 9: a foreground app can now request a maximum of 4 scans in a 2-minute window; background apps are restricted to one scan per 30 minutes for all background apps combined. The only way to avoid this throttling is the NETWORK_SETTINGS
permission, which, however, is a signature permission (I take that to mean it needs to be signed with the same key as the OS build, regardless of whether it’s a system app) and thus not available to third-party apps.
I understand that wifi RTT ranging can only be initiated with a ScanResult
, thus I’d need to run a wifi scan first. However, I could presumably bypass the throttle by reusing the same scan result for a couple of RTT ranging requests, at the expense of not getting new wifis for some time.
However, the docs also mention throttling for wifi RTT ranging, however, without specifying what the limits are.
Finally, WifiManager.startScan()
is deprecated and apps may no longer be able to start scans in future releases.
Questions:
ScanResult
, which I need to start an RTT ranging request?I haven't seen any documentation of the limits, but from Android source code you see at least these:
Source code of Wifi RTT service implementation is here: https://android.googlesource.com/platform/frameworks/opt/net/wifi/+/android-9.0.0_r3/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
Google has closed most of the WiFi throttling threads in Issue Tracked with comment "will be used to improve future Android version", but there are active like this: https://issuetracker.google.com/issues/112688545 Could you raise your question there?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With