Last active
January 13, 2021 21:49
-
-
Save thrashedbrain/616dad7abc34b078732c28f51729399d 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
private boolean isNetworkConnected() { | |
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment