List of usage examples for android.location LocationManager GPS_PROVIDER
String GPS_PROVIDER
To view the source code for android.location LocationManager GPS_PROVIDER.
Click Source Link
From source file:Main.java
public static boolean displayGPSStatus(LocationManager locManager) { boolean gps_enabled = false; try {//from w w w . j ava 2s. c om gps_enabled = locManager.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch (Exception ex) { Log.i("GPSStatus", " checking GPSStatus throws error " + ex); } return gps_enabled; }
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 isGpsOpen(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (lm.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)) { return true; } else {//w ww.j a va 2s . c o m return false; } }
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); if (!alm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { return false; }// ww w . ja v a 2 s. 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); }
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() { LocationManager lm = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); return lm.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); }
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); }