isConnectionAvailable

@RequiresPermission(value = "android.permission.ACCESS_NETWORK_STATE")
fun Context.isConnectionAvailable(): Boolean

Context Extension to know if the Internet connection is available, this will return a Boolean

The ACCESS_NETWORK_STATE permission must be included in the Context.connectivityManager for this function to be performed correctly

See also

com.jeluchu.jchucomponents.core.extensions.context.connectivityManager