且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android获取随其变化的WiFi信号强度

更新时间:2023-02-26 15:32:19

更新:从Android 4.4和5.0进行的测试来看,连续WiFi扫描之间的间隔似乎不到一秒钟.您可以在这里查看我的使用Android设备进行射频测量的演示:

Update: From tests in Android 4.4 and 5.0 the interval between sequential WiFi scans seems to be less than a second. You can take a look at my demo for RF measurements using Android device, here:

https://github.com/panosvas/Measurements

您可以在其中逐个找到WiFi测量的实现.我还创建了一个用于存储这些测量值的服务器以及一个使用UDP数据包的远程触发应用程序,您可以在这里找到:

where you can find an implementation of WiFi measurements one after another. I have also created a Server for storing these measurements as well as a remote trigger app using UDP packets where you can find here:

https://github.com/panosvas/IndoorPositioningServer

实际上,您不能每次都更改RSSI,因为RSSI值可能会在几毫秒甚至更快的时间内发生变化,并且Android中的每一次wifi测量大约需要5秒钟,具体取决于设备.

Actually, you cannot take the RSSI each time it changes because it is possible that the RSSI value changes in a period of mseconds or even faster and each wifi measurement in Android takes approximately 5 seconds depending also on the device.

因此,您在以下文章中对我的建议有何建议?

So, what you advice my answers in the following posts for that:

可扫描20次的Wifi扫描器

如何无需单击即可更新wifi RSSI值按钮