问题描述
你们当中有没有Android的大师那里知道任何开源$ C $ C创建的从给定的?这将是有益的。事实上,我捕捉线483(/ 624)(中间2012年4月) WifiConfiguration.java
的Android源是一个注释掉的构造打算做的正是这一点,与大TODO不知道是否值得实施(见下文报价)。我的运动是的,我可以听到第二个?
Do any of you Android gurus out there know of any open source code to create a WifiConfiguration
from a given ScanResult
? It would be helpful. Indeed, line 483 (/624) of my capture (mid April 2012) of the Android source of WifiConfiguration.java
is a commented-out constructor intended to do exactly this, with a big TODO wondering whether it's worth implementing (see quote below). I motion yes, can I hear a second?
我看(这实际上是对这个问题的冲击)的主要挑战是如何跨preT的ScanResult.configuration字符串。
The main challenge I see (which is actually the brunt of this question) is how to interpret the ScanResult.configuration String.
- 在我能想到的东西只是一个简单的列表
[WPA2-PSK-CCMP]
,[WPS]
等? - 是这些字符串中的文档或code基列举的地方?
- 是否有设备/生产/ AP-特定字符串我应该知道的?
- can I expect just a simple list of things like
[WPA2-PSK-CCMP]
,[WPS]
, etc? - are these strings enumerated somewhere in the docs or code base?
- are there device/manufacturer/AP-specific strings Ishould know about?
在 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://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 60523
推荐答案
我发现这个项目的特别是非常有帮助的下列文件:
I found this project https://code.google.com/p/android-wifi-connecter/ and the following files in particular very helpful:
<一个href="https://$c$c.google.com/p/android-wifi-connecter/source/browse/src/com/farproc/wifi/connecter/Wifi.java" rel="nofollow">https://$c$c.google.com/p/android-wifi-connecter/source/browse/src/com/farproc/wifi/connecter/Wifi.java<一href="https://$c$c.google.com/p/android-wifi-connecter/source/browse/src/com/farproc/wifi/connecter/ConfigurationSecuritiesV8.java" rel="nofollow">https://$c$c.google.com/p/android-wifi-connecter/source/browse/src/com/farproc/wifi/connecter/ConfigurationSecuritiesV8.java
这篇关于从ScanResult构建WifiConfiguration或:国米preting ScanResult的'能力'字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!