Wifi Scanning Blocked / Limited by Android Pie?


Hi, I am working on an Ionic app where I am using a hotspot plugin to scan available WiFi WAPs around me. My app runs the scan every second. However, on Android Pie (Security Patch 5 May 2019), after scanning for first few seconds, the app doesn’t seem to detect any WAPs.

Leaving the app for a few seconds makes it detect WAPs again but this time also for a few seconds before it dies again until next time.

This has been tested on different devices with Android Pie and the behaviour is same. However, when I test it on any Android version other than Android Pie, it works fine; i.e. it keeps updating the scan every second and give me the scan results as expected. My question is: Is there anything in Android Pie that is stopping my app to scan available WAPs every second?


Have you checked with the plugin author about this?


The following limitations apply to the frequency of scans using WifiManager.startScan().

Android 8.0 and Android 8.1:

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

Android 9 and later:

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.

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