开发者

Can an android phone pause wifi scan requests?

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 scan开发者_如何学JAVAs, 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


Any chance of posting some code?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜