Question

I was wondering if ALL android smartphones have the orientation of the 3-axis of the accelerometer pointing in the same direction w.r.t. the device.

Well I wanted to post an image, but it seems i don't have the reputation to do it so..

Assume the smartphone is held vertically with the speaker above the screen and you are looking at the screen, so the axis will be:

  • positive x axis associated to the width of the device and pointing to the RIGHT
  • positive y axis associated to the height of the device and pointing UP
  • positive z axis through the device and pointing towards you

Is it the case for all ANDROID smartphones?

Was it helpful?

Solution 2

Well I wanted to post an image, but it seems i don't have the reputation to do it

You are welcome to post the image elsewhere on the Internet and link to it from your question, until you have enough reputation to be able to post the images more directly.

Is it the case for all ANDROID smartphones?

No, insofar as not all Android devices have accelerometers, and I cannot rule out some device manufacturer screwing things up from what the documented behavior should be. However, the vast majority of devices with accelerometers should follow the documented approach.

OTHER TIPS

The X/Y/Z axes are defined so that sensor X/Y correspond to screen X/Y when the device is held in its natural orientation. For smartphones this is portrait, with the earpiece up. For tablets, the natural orientation is landscape, so X will correspond to the longer edge of the screen.

Be aware that sensor axis are always relative to the device, i.e. when you rotate the screen, screen X is different from sensor X.

See Sensor Coordinate System.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top