Code example for LocationManager

Methods: getProviders

0
 
	public boolean isLocationEnabled() { 
		boolean enabled = false;
 
		if (locationManager != null) {
			List<String> providers = locationManager.getProviders(true);
			if (providers != null && providers.size() > 0) {
				if (DBG) {
					Log.i(LCAT, "Enabled location provider count: " + providers.size());
				} 
				enabled = true;
			} 
		} 
 
		return enabled;
	} 
 
	public void onResume() { 
 
		locationManager = (LocationManager) proxy.getTiContext().getActivity().getSystemService(Context.LOCATION_SERVICE);