Java tutorial
//package com.java2s; import android.content.Context; import android.location.LocationManager; public class Main { /** * Check Network provider is enabled for location update * * @param context * @return if network provider enabled */ public static boolean isNetworkProviderEnabled(Context context) { final LocationManager manager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return manager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); } }