Last active
May 13, 2016 09:52
-
-
Save appersiano/3f31f9d12174f92cb1dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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 CheckNetwork() { | |
ConnectivityManager cm = (ConnectivityManager) caller | |
.getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); | |
boolean isConnected = activeNetwork != null | |
&& activeNetwork.isConnectedOrConnecting(); | |
return isConnected; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment