Orientation Sensor

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Jan 28, 2013 9:54:34 AM via Website

Hi Everyone,

I want to make a simple application by using orientation sensor. I have a samsung tablet 8.9, I want to get roll angles when in landscape mode and camera on top. In sensorchanged events, I'm getting some values like bottom. I dont understand this values what do they mean. I want get roll degree, like 30,45,65 etc. Can you help me?


public void onSensorChanged(SensorEvent event) {
text1.setText("Azimuth: " + String.valueOf(event.values[0]));
text2.setText("Pitch: " + String.valueOf(event.values[1]));
text3.setText("Roll: " + String.valueOf(event.values[2]));