Showing posts with label check if gps is on or off. Show all posts
Showing posts with label check if gps is on or off. Show all posts

Wednesday, January 16, 2013

check if gps is on or off:



public static boolean hasGPSCapability(Context context) {
final LocationManager mgr = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
boolean status = mgr.isProviderEnabled(LocationManager.GPS_PROVIDER);
return status;