GPS Location

		LocationManager  loctionManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
	         Criteria criteria = new Criteria();
		criteria.setAccuracy(Criteria.ACCURACY_FINE);
		criteria.setCostAllowed(false);
		criteria.setPowerRequirement(Criteria.POWER_LOW);
		criteria.setBearingRequired(false);
		criteria.setAltitudeRequired(false);



		String provider = loctionManager.getBestProvider(criteria, true);  // or others provider.
		Location location = loctionManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

 

你可能感兴趣的:(GPS Location)