2012-05-25 7 views
11

あなたの誰かがオープンソースのコードを知っていてScanResultからWifiConfigurationを作成しますか?それは役に立つだろう。確かに、WifiConfiguration.javaのAndroidソースの私のキャプチャ(2012年4月中旬)の483行目(/ 624)は、これを正確に行うためのコメントアウトされたコンストラクタであり、大きなTODOが実装する価値があるかどうかは不思議です。私の動きはい、もう一度聞くことができますか?ScanResultからWifiConfigurationを構築するか、または:ScanResultの '能力'を解釈するString

私が見ている主な課題(実際にはこの質問の正解です)は、ScanResult.configuration文字列の解釈方法です。

  1. [WPA2-PSK-CCMP][WPS]などの簡単なリストを期待できますか?
  2. は、ドキュメントやコードベースのどこかに列挙されていますか?
  3. デバイス/製造元/ AP固有の文字列がありますか? について知っておく必要がありますか?

WifiConfiguration.java(可能editorializing付き)から:

https://code.google.com/p/android-wifi-connecter/source/browse/src/com/farproc/wifi/connecter/Wifi.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

答えて

4
+0

:https://github.com/kevin-yuan/android-wifi-connecter – ThomasW

+0

を日付リンクまで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

関連する問題