以编程方式显示和重命名连接到便携式热点的Android设备

时间:2016-07-06 04:02:30

标签: android android-wifi

private void scan() {
    ArrayList<ClientScanResult> clients = wifiApManager.getClientList(false);
device1.append("Clients: \n");
    for (ClientScanResult clientScanResult : clients) {
        device1.append("####################\n");
        device1.append("IpAddr: " + clientScanResult.getIpAddr() + "\n");
        device1.append("Device: " + clientScanResult.getDevice() + "\n");
        device1.append("HWAddr: " + clientScanResult.getHWAddr() + "\n");
        device1.append("isReachable: " + clientScanResult.isReachable() + "\n");
    }
}

我使用此代码,但显示没有任何内容。

0 个答案:

没有答案