Android Context Check isConnected(Context context)

Here you can find the source of isConnected(Context context)

Description

is Connected

Declaration

public static boolean isConnected(Context context) 

Method Source Code

//package com.java2s;
import android.content.Context;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class Main {
    public static boolean isConnected(Context context) {
        ConnectivityManager conn = (ConnectivityManager) context
                .getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo info = conn.getActiveNetworkInfo();
        return (info != null && info.isConnected());
    }//  w  w w.j  a v a2 s . c o m
}

Related

  1. isAppOnForeground(Context context)
  2. isApplicationBroughtToBackground( final Context context)
  3. isApplicationBroughtToBackground( final Context context)
  4. isCallable(Context context, String url)
  5. isConnected(Context connext)
  6. isDebugCertificateCheck(final Context context)
  7. isDebuggable(final Context context, final boolean includeDefaultDebugCertificateCheck)
  8. isExisting(Context context, Uri uri, String selection, String[] args)
  9. isFileExist(Context ctx, String filename)