Get Android rotation angle in x-axis

android, android-sensors

Solution

There is azimuth, pitch and roll available to you. Not sure which one relates to your "x-axis" but I think its azimuth.

Time for helpful links:

- http://www.workingfromhere.com/blog/2009/03/30/orientation-sensor-tips-in-android/

- http://marakana.com/forums/android/examples/43.html

- http://marakana.com/static/tutorials/SensorDemo.zip

Problem

I'm experimenting with some Android functions. Right now, I'm trying to get the rotation angle of the device, so when I show a happy face bitmap on a canvas, it always looks "straight". All I would need for this, is to get the x-axis rotation angle (I guess) but I can't find how to achieve it. Hope you can help me. Thank you.

Original source