//sorisdk/com.iplateia.sorisdk/NetworkUtils/isNetworkAvailable
isNetworkAvailable
[androidJvm]
fun isNetworkAvailable(context: Context): Boolean
Checks if a network connection is currently available and validated.
This method performs a comprehensive network availability check that:
- On API 23+: Verifies both internet capability and network validation
- On older APIs: Falls back to checking connected state of active network
The validation check ensures that the network can actually reach the internet, not just that it's connected to a router or access point.
Return
true
if a validated network connection is available, false
otherwise
Parameters
androidJvm
context | The application context used to access system services |
See also
ConnectivityManager |
NetworkCapabilities |