isNetworkAvailable

fun isNetworkAvailable(): Boolean

see Context.isNetworkAvailable