我如何来重构WLAN测试程序?
Preface
”我为什么要重构WLAN测试程序?“
1. WLAN
2. 打开WLAN
mWifiManager.setWifiEnable(true);
3. 搜索WLAN
| String | WIFI_STATE_CHANGED_ACTION | Broadcast intent action indicating that Wi-Fi has been enabled, disabled, enabling, disabling, or unknown. |
public static final String EXTRA_WIFI_STATE
The lookup key for an int that indicates whether Wi-Fi is enabled, disabled, enabling, disabling, or unknown. Retrieve it with getIntExtra(String, int).
See Also
public boolean startScan ()
Request a scan for access points. Returns immediately. The availability of the results is made known later by means of an asynchronous event sent on completion of the scan.
Returns
trueif the operation succeeded, i.e., the scan was initiated
public static final String SCAN_RESULTS_AVAILABLE_ACTION
An access point scan has completed, and results are available from the supplicant. CallgetScanResults() to obtain the results.
public List<ScanResult> getScanResults ()
Return the results of the latest access point scan.
Returns
- the list of access points found in the most recent scan.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public String | BSSID | The address of the access point. | |||||||||
| public String | SSID | The network name. | |||||||||
| public String | capabilities | Describes the authentication, key management, and encryption schemes supported by the access point. | |||||||||
| public int | frequency | The frequency in MHz of the channel over which the client is communicating with the access point. | |||||||||
| public int | level | The detected signal level in dBm. | |||||||||
| public long | timestamp | Time Synchronization Function (tsf) timestamp in microseconds when this result was last seen. | |||||||||
本文阐述了重构WLAN测试程序的原因,包括改进UI设计、直观呈现测试流程,并提供了开启、搜索、连接和关闭WLAN的具体步骤。同时,介绍了如何设计友好的用户界面布局,以提升用户体验。
5091

被折叠的 条评论
为什么被折叠?



