例如,如何每 3 秒从 wifi 获取扫描结果,无需mWifimanager.startScan();
谷歌说:
startScan()
This method was deprecated in API level P. The ability for apps to trigger scan requests will be removed in a future release.
请注意,我使用此 API 级别
List<ScanResult> results = mWifiManager.getScanResults();
而不调用startScan
,列表包含 wifi AP,但它使更新非常缓慢
更新至 2019 年 1 月 12 日:https ://issuetracker.google.com/issues/112688545