Created
September 1, 2022 14:28
-
-
Save JuniiiSays/f891a6cd85e448463c8ac668521108eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConnectivityManager connectivityManager = (ConnectivityManager) | |
getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); | |
if(networkInfo != null && networkInfo.isConnected()){ | |
// TODO: Do sothing here if the user is Connected to the INTERNET | |
} else { | |
// TODO: Do sothing here if the user is not connected to the INTERNET | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment