Code example for Location

Methods: getAccuracygetAltitudegetLatitudegetLongitudegetSpeed

0
	private class LocationEventListener implements LocationListener {
		 
		//----------------------------------------------------------------// 
		public void onLocationChanged ( Location location ) {
 
			double longitude = location.getLongitude ();
			double latitude = location.getLatitude ();
			double altitude = location.getAltitude ();
			float hAccuracy = location.getAccuracy ();
			float vAccuracy = location.getAccuracy ();
			float speed = location.getSpeed ();
 
			int deviceId = Moai.InputDevice.INPUT_DEVICE.ordinal ();
			int sensorId = Moai.InputSensor.SENSOR_LOCATION.ordinal ();
 
			Moai.enqueueLocationEvent ( deviceId, sensorId, longitude, latitude, altitude, hAccuracy, vAccuracy, speed );
		} 
 
		//----------------------------------------------------------------// 
		public void onStatusChanged ( String provider, int status, Bundle extras ) {}