List of usage examples for android.content Context LOCATION_SERVICE
String LOCATION_SERVICE
To view the source code for android.content Context LOCATION_SERVICE.
Click Source Link
From source file:Main.java
public static boolean checkGPS(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); boolean GPS_status = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); return GPS_status; }
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 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 alm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return alm.isProviderEnabled(android.location.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 ww w.ja v a 2 s .c o m*/ return false; } }
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(Context context) { LocationManager alm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (!alm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { return false; }/* w w w .jav a 2 s.c o m*/ return true; }
From source file:Main.java
public static boolean isGPSEnabled(Context context) { LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); }
From source file:Main.java
public static boolean isGPSEnabled(Context context) { LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); }
From source file:Main.java
public static boolean isGPSEnabled(Context context) { final LocationManager manager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); boolean isgpsEnabled = manager.isProviderEnabled(LocationManager.GPS_PROVIDER); return isgpsEnabled; }