Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isOnline() {
- ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
- return cm.getActiveNetworkInfo().isConnectedOrConnecting();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement