I'm searching for a compass example for Android. All I need to do is to get the correct bearing (in portrait & landscape mode).
I already found several samples, some use only Sensor.TYPE_ORIENTATION, some use a combination of Sensor.TYPE_ACCELEROMETER & Sensor.TYPE_MAGNETIC_FIELD.
Which is the correct & common way to get the bearing for let's say Android 1.6 - 4.0?