您是否有任何Android專家知道有任何開源代碼可以從給定的ScanResult
創建WifiConfiguration
?這將有所幫助。事實上,我捕獲的2012年4月中旬(2012年4月中旬)的第483行(/ 624)是一個註釋掉的構造函數,意在完成這個任務,一個大TODO想知道它是否值得實現(請參見下面的引用)。我的動議是,我能聽到第二個?從ScanResult構建WifiConfiguration或:解讀ScanResult的「功能」字符串
我看到的主要挑戰(實際上這個問題首當其衝)是如何解釋ScanResult.configuration字符串。
- 我能期待一個簡單的列表,例如
[WPA2-PSK-CCMP]
,[WPS]
等嗎? - 這些字符串枚舉在文檔或代碼庫的某處嗎?
- 是否有設備/製造商/ AP特定的字符串I 應該知道?
從WifiConfiguration.java
(可能社論):
/**
* Construct a WifiConfiguration from a scanned network
* @param scannedAP the scan result used to construct the config entry
* TODO: figure out whether this is a useful way to construct a new entry.
*
public WifiConfiguration(ScanResult scannedAP) {
networkId = -1;
SSID = scannedAP.SSID;
BSSID = scannedAP.BSSID;
// aaaah screw it I'm tired/lazy
}
*/
https://code.google.com/p/android/issues/detail?id=60523
該項目已搬到這裏:https://github.com/kevin-yuan/android-wifi-connecter – ThomasW
到目前爲止鏈接:https://github.com/kevin-yuan/android-wifi-connecter/blob/master/src/com/farproc/wifi/connecter/Wifi.java https://github.com/kevin-yuan/android- WiFi的連接器/斑點/主/ SRC/COM/FARPROC/WIFI /連接器/ ConfigurationSecuritiesV8.java – ThomasW