Wi-Fi 不自动连接
cuilingling opened this issue · comments
为什么 官网上下载的demo 扫码后可以自动连上Wi-Fi,而你们的源码编译后 扫码后停留设置页面,不回去自动连接 Wi-Fi ,是不是需要上架?
这个是源码的建议
See WifiNetworkSpecifier.Builder.build() for new mechanism to trigger connection to a Wi-Fi network. b) See addNetworkSuggestions(List), removeNetworkSuggestions(List) for new API to add Wi-Fi networks for consideration when auto-connecting to wifi. Compatibility Note: For applications targeting Build.VERSION_CODES.Q or above, this API will always fail and return false. Deprecation Exemptions:
降级到29一下啊可以使用!
您好,下载示例代码后需添加以下权限,您可以添加这些权限后重试:
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />