Java tutorial
//package com.java2s; import android.content.Context; import android.content.pm.PackageManager; public class Main { /** * Checking for network support * * @param ctx : context to be passed * @return : true is network support is available. */ public static final boolean hasNetworkSupport(Context ctx) { PackageManager packageManager = ctx.getPackageManager(); return (packageManager.hasSystemFeature(PackageManager.FEATURE_LOCATION_NETWORK)); } }