Deprecated retrieval of Orientation work not the new way
<p>The old deprecated way of getting IMU Fused Orientation from the SensorManager works</p>

<pre><code>float[] imu;

SensorEventListener eventListenerOrientation = new SensorEventListener() {
    public void onSensorChanged(SensorEvent event) {
        imu = event.values.clone();
    }
    public void onAccuracyChanged(Sensor sensor, int accuracy) {
    }
};

sensorManager.registerListener(eventListenerOrientation,
sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION),
SensorManager.SENSOR_DELAY_GAME);
</code></pre>

<p>The new way does not work with any sample rate (GAME, FASTEST, etc), it introduces alot of noise</p>

<pre><code>float[] imu = new float[3];     
float[] inR = new float[16];
float[] I = new float[16];

public void onSensorChanged(SensorEvent sensorEvent) {
    if(sensorEvent.accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE)
        return;

    switch (sensorEvent.sensor.getType()) {
        case Sensor.TYPE_ACCELEROMETER:
            acc = sensorEvent.values.clone();
        break;
        case Sensor.TYPE_MAGNETIC_FIELD:
            mag = sensorEvent.values.clone();
        break;
    }

    if (acc != null &amp;&amp; mag != null) {
        boolean success = SensorManager.getRotationMatrix(inR, I, acc, mag);
        if (success) {
            SensorManager.getOrientation(inR, imu);
        }
    }
}
</code></pre>
