Code example for SensorManager

Methods: unregisterListener

        sensorManager.registerListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_NORMAL);
    protected void onLastObserver() { 
    public void onAccuracyChanged(final Sensor sensor, int accuracy) {
         * There is a bug in Android, which apparently causes this method to be called every 
         * time the sensor _value_ changed, even if the _accuracy_ did not change. So logging 
         * this event leads to the log being flooded with multiple entries _per second_, 
         * which I experienced when running cgeo in a building (with GPS and network being 
         * unreliable). 
         * See for example 
        //Log.i(Settings.tag, "Compass' accuracy is low (" + accuracy + ")");