List of usage examples for android.location LocationManager isProviderEnabled
public boolean isProviderEnabled(String provider)
From source file:Main.java
private static boolean isNetworkBasedGpsEnabled(LocationManager locationManager) { return locationManager.isProviderEnabled((LocationManager.NETWORK_PROVIDER)); }
From source file:Main.java
public static boolean gpsWorkIsAvailable(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }
From source file:Main.java
public static boolean isGpsEnabled(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }
From source file:Main.java
public static boolean isLocationEnabled(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER) || lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }
From source file:Main.java
public static boolean isGpsEnabled() { LocationManager lm = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); return lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }
From source file:Main.java
public static boolean isGpsOpen(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (lm.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)) { return true; } else {//from w w w . j a v a 2 s .com return false; } }
From source file:Main.java
public static boolean checkGPSStatus(Context context) { boolean resp = false; LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { resp = true;/*from w w w .j a v a 2 s.c om*/ } return resp; }
From source file:Main.java
public static boolean isGpsConnected(Context context) { boolean resp = false; LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { resp = true;/* w w w . j a va 2 s.c om*/ } return resp; }
From source file:Main.java
public static boolean isGpsEnabled(Context context) { LocationManager alm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (!alm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { return false; }//from w w w . java2s . c o m return true; }
From source file:Main.java
public static boolean isGPSEnabled(Context context) { LocationManager alm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return alm.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER); }