Code example for SensorManager

Methods: getSensorListregisterListener

0
	} 
	 
 
	public void start() 
	{ 
		List<Sensor> list = this.sensorManager.getSensorList(Sensor.TYPE_ORIENTATION);
		if (list.size() > 0)
		{ 
			this.mSensor = list.get(0);
			this.sensorManager.registerListener(this, this.mSensor, SensorManager.SENSOR_DELAY_NORMAL);
		} 
		 
	} 
	 
	public void stop() 
	{ 
		this.sensorManager.unregisterListener(this);
	} 
	 
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// TODO Auto-generated method stub