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;

No comments:

Post a Comment