isNetworkConnected

fun isNetworkConnected(): Boolean

判断网络是否连接

需添加权限 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

Return

true: 是

false: 否