isNetworkAvailable

fun Context.isNetworkAvailable(): Boolean

Check if the user is connected to a network. This can be any network.

Return

true if connected or connecting;

false otherwise.