Code example for ConnectivityManager

Methods: getNetworkInfo

0
     * @return 
     */ 
    public static boolean isWifiConnected(Context context) {
        ConnectivityManager connectivityManager = (ConnectivityManager) context
                .getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo wifiNetworkInfo = connectivityManager
                .getNetworkInfo(ConnectivityManager.TYPE_WIFI);
        if (wifiNetworkInfo != null) {
            return wifiNetworkInfo.isConnected();
        } 
        return false; 
    } 
 
    /** 
     * Copies the contents of one file to the other using {@link FileChannel}s. 
     *  
     * @param src source {@link File} 
     * @param dst destination {@link File} 
     * @throws IOException 
     */ 
    public static void copyFile(File src, File dst) throws IOException {