wifi列表< scanresult>信息批次

发布于 2025-02-13 15:32:00 字数 806 浏览 0 评论 0原文

抱歉,这个问题可能很容易/令人困惑,因为我是Java和Android Studio的新手。

Android.net.wifi.ScanResult类具有SSID/BSSID字段,该字段通过调用ScanResult.SSID来提供扫描访问点的信息。

但是,如果我创建List = Scanresults,我应该如何访问列表中每个扫描的信息? 太感谢了。

有关Scanresult和RangingRequest的信息可以在此处找到。 https://developer.android.com/reference/android/net/wifi/scanresult?hl= en#getInformationlements() https://developer.android.com/static/reference/android/net/wifi/rtt/rangingrequest.builder#addaccesspoints

Sorry this question might be easy/confusing because I'm new to Java and Android Studio.

The android.net.wifi.ScanResult class has fields SSID/BSSID that gives the information of the scanned access point by calling ScanResult.SSID.

However, if I create List = scanresults, how should I access the information of each ScanResult in the list?
Thank you so much.

Information regarding ScanResult and RangingRequest could be found here.
https://developer.android.com/reference/android/net/wifi/ScanResult?hl=en#getInformationElements()
https://developer.android.com/static/reference/android/net/wifi/rtt/RangingRequest.Builder#addaccesspoints

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫嚣ゝ 2025-02-20 15:32:00

您可以使用以下代码访问列表中的每个扫描

private void printList(List<ScanResult> list){
    for(ScanResult result: list){
        int level = WifiManager.calculateSignalLevel(result.level, 100);
        System.out.println(result.SSID + " Level is " + level + " out of 100");
    }
}

You can use below code to Access each Scanresult in the list

private void printList(List<ScanResult> list){
    for(ScanResult result: list){
        int level = WifiManager.calculateSignalLevel(result.level, 100);
        System.out.println(result.SSID + " Level is " + level + " out of 100");
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文