あなたの誰かがオープンソースのコードを知っていてScanResult
からWifiConfiguration
を作成しますか?それは役に立つだろう。確かに、WifiConfiguration.java
のAndroidソースの私のキャプチャ(2012年4月中旬)の483行目(/ 624)は、これを正確に行うためのコメントアウトされたコンストラクタであり、大きなTODOが実装する価値があるかどうかは不思議です。私の動きはい、もう一度聞くことができますか?ScanResultからWifiConfigurationを構築するか、または:ScanResultの '能力'を解釈するString
私が見ている主な課題(実際にはこの質問の正解です)は、ScanResult.configuration文字列の解釈方法です。
[WPA2-PSK-CCMP]
、[WPS]
などの簡単なリストを期待できますか?- は、ドキュメントやコードベースのどこかに列挙されていますか?
- デバイス/製造元/ AP固有の文字列がありますか? について知っておく必要がありますか?
WifiConfiguration.java
(可能editorializing付き)から:
/**
* 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-wif-connecter/blob/master/src/com/farproc/wifi/connecter/Wifi.java https://github.com/kevin-yuan/android- wifi-connector/blob/master/src/com/farproc/wifi/connector/ConfigurationSecuritiesV8.java – ThomasW