OrientationEventListener vs Rotation Vector Sensor to get “orientation”

本秂侑毒 提交于 2019-12-11 06:55:37

问题


The first of all my apologies, if I am using wrong terms. I have done some digging and therefore I am a bit confused. I will correct the question if there are wrong terms..

Which one I should prefer (OrientationEventListener or Rotation Vector Sensor) if I need to get just device "orientation"? And if I have understood the terms correctly then in this case I mean the Yaw by orientation.

As a background then I have an app that is locked to e.g. portrait mode, but I would still like to display Views based on device position. In this case I am not interested about position if the device is flat e.g. lying on table on its back.

I am wondering this, because I can achieve my goal with both of them.

来源:https://stackoverflow.com/questions/49671273/orientationeventlistener-vs-rotation-vector-sensor-to-get-orientation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!