0
我可以掃描並區分具有相同SSID但不同BSSID的Wifis嗎?我想通過具有相同SSID的AP獲取所有BSSID。 謝謝。Android - 我可以掃描並區分具有相同SSID但不同BSSID的Wifis嗎?
我可以掃描並區分具有相同SSID但不同BSSID的Wifis嗎?我想通過具有相同SSID的AP獲取所有BSSID。 謝謝。Android - 我可以掃描並區分具有相同SSID但不同BSSID的Wifis嗎?
是的,我們絕對可以根據BSSID掃描和區分Wifis。
試試這個:
class WifiScanReceiver extends BroadcastReceiver {
@SuppressLint("UseValueOf")
public void onReceive(Context c, Intent intent) {
List<ScanResult> wifiScanList = wifiManager.getScanResults();
for (int i = 0; i < wifiScanList.size(); i++) {
String ssid = wifiScanList.get(i).SSID; //Get the SSID
String bssid = wifiScanList.get(i).BSSID //Get the BSSID
/****
//manipulate bssid or ssid according to your need
//in your case, use it for differentiating
***/
}
}
}