gps检查可用与否
public boolean isGpsEnabled(Context context) {?
? ? LocationManager locationManager = ((LocationManager)context.getSystemService(Context.LOCATION_SERVICE));?
? ? List<String> accessibleProviders = locationManager.getProviders(true);?
? ? return accessibleProviders != null && accessibleProviders.size() > 0;?
}?