• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to get rotation around plane different than XY in Android?

polonskyg

Lurker
Aug 9, 2010
8
0
getDefaultDisplay().getRotation()

retrieves values like

Surface_ROTATION_0,
Surface_ROTATION_90,
Surface_ROTATION_180,
Surface_ROTATION_270
and so on, and that's around XY plane I guess, Am i right? What if I want to know the rotation in the XZ plane or YZ plane?

What I'm trying to achieve is, for example, if I need to calculate if a runner is stopping (and I can't use the GPS) where the runner can have the cellphone in different positions, I must know which axle is the one parallel to the floor in order to check on those values if there is any deceleration and is not that the cellphone is just "jumping" with the runner.

Thanks in advance. Guillermo.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones