Code example for Location

Methods: getAccuracygetAltitudegetBearinggetExtrasgetLatitudegetLongitudegetSpeed

0
	} 
	 
	private void centerOnLocation(){ 
		loc = locman.getLastKnownLocation(provider);
		if(loc != null){
			lat = loc.getLatitude();
			lon = loc.getLongitude();
			GeoPoint newPoint = new GeoPoint((int)(lat*1e6),(int)(lon*1e6));
			mapControl.animateTo(newPoint);
			getSatelliteData(); 
			 
			//Push the data into the sat overlay! 
			if(displayOverlay != null){
				displayOverlay.putSatStuff(lat,lon,satAccuracy,bearing,altitude,speed,currentProvider,numberSats);				
			} 
		} 
 
	} 
	 
	private void getSatelliteData(){ 
		if(loc != null){
			 
			//Num of satellites used for the fix 
			locBundle = loc.getExtras();
			if(locBundle != null){
				numberSats = locBundle.getInt("satellites",-1);
				 
			} 
			 
			satAccuracy = loc.getAccuracy();
			bearing = loc.getBearing();
			altitude = loc.getAltitude();
			speed = loc.getSpeed();
		} 
	} 
	 
	public void onPause(){ 
		super.onPause(); 
Stop searching for code, let great code find you!  Add Codota to your java IDE