Code example for Sensor

Methods: getName

0
				 
			} 
			 
			@Override 
			public void onAccuracyChanged(Sensor sensor, int accuracy) {
				appendDetails(sensor.getName()+"::"+String.valueOf(accuracy));
				 
			} 
		}; 
		sensorManager.registerListener(listenerACC,
				sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), 
				SensorManager.SENSOR_DELAY_FASTEST);
		 
		 
		listenerMAG=new SensorEventListener() {
			 
			@Override 
			public void onSensorChanged(SensorEvent event) {
				if(event.sensor.getType()==Sensor.TYPE_MAGNETIC_FIELD){
 
					// assign directions