We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
调试手机连接一个另外一个手机的移动数据热点,然后关闭热点手机的移动网络,也就是热点连上了,但是实际上是用不了的,就会返回错误。本来isAvailable应该返回false,但是却返回了true
private suspend fun checkNetWork() { val ret = NetworkUtils.isAvailable() Log.e("TAG", "是否可用?"+ret) } private fun startJob() { lifecycleScope.launch(Dispatchers.Default + jobRefresh) { while (true) { delay(1000) checkNetWork() } } }
The text was updated successfully, but these errors were encountered:
isAvailable判断的是手机链路是否通畅,如果要看是否能联网得用byping
Sorry, something went wrong.
Blankj
No branches or pull requests
描述 Bug
调试手机连接一个另外一个手机的移动数据热点,然后关闭热点手机的移动网络,也就是热点连上了,但是实际上是用不了的,就会返回错误。本来isAvailable应该返回false,但是却返回了true
相关代码
截图
The text was updated successfully, but these errors were encountered: