isConnected

fun isConnected(context: Context): Boolean

Checks if the device is currently connected to a network.

Return

True if there is an active network connection, false otherwise.

Parameters

context

The application context used to access the connectivity service.