Question

I wrote an android application to request a scan for available wifi signals around, using the WifiManager, then dump the results to a file. The program works fine, but this weird bug occurs.

Initially I was requesting a scan every 30 seconds, and everything worked fine. I then tried to request a scan every two seconds, I get this strange bug. Everything will work fine for a few minutes, then the time between two scan requests jumps from 2 seconds to 50 seconds for no reason. Then, for four more scans, it will scan at 2-second intervals, then skip to a 50-second interval, and it continues to do this consistently.

With larger time intervals this bug does not appear. Has anyone experienced this bug before? Is there a way to prevent it? Or does Android automatically cancel scan requests if they are too frequent?

Thank you for your help!

NS

Was it helpful?

Solution

Any chance of posting some code?

Could this be an intentional limitation placed upon developers to avoid killing the battery.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top