Android Open Source - notes Connectivity Utils

From Project

Back to project page notes.


The source code is released under:

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <> Everyone is permitted to copy and distribute verbatim or...

If you think the Android project notes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.iliakplv.notes.utils;
/*from   w  w  w .j  ava2 s  .co m*/
import android.content.Context;

import com.iliakplv.notes.NotesApplication;

public class ConnectivityUtils {

  private ConnectivityUtils() {
    throw new AssertionError("Instance creation not allowed!");

  public static boolean isNetworkConnected() {
    final ConnectivityManager cm = (ConnectivityManager) NotesApplication.getContext()
    final NetworkInfo activeNetworkInfo = cm.getActiveNetworkInfo();
    return activeNetworkInfo != null;


Java Source Code List