我看到这个了 thread 但这对我没什么帮助。
使用 ConnectivityManager 和 getActiveNetworkInfo() .
ConnectivityManager
getActiveNetworkInfo()