Android Question screen oriantation and Accelerometer sensor

RomansUP

Member
Licensed User
Longtime User
Hi, I have a problem with screen oriantation and Accelerometer sensor.
My program must run only in lanscape orientation. I set it in Project Attributes region like
#SupportedOrientations: landscape
it's OK
On my 10 inch ASUS tablet it's work perfect But on 7 inch tablet Accelerometer sensor returns values like tablet still in portrait orientation. I mean that x values and y values of Accelerometer sensor are swapped together. So as I understand if I change screen orientation it does not changes orientation of Accelerometer sensor values.
Is it possible to fix this problem?
MoreOver I try to use program from Play Market "sensorbox" This program works correctly with 7 inch tablet but on this time incorrect with 10 inch tablet (x values again swapped with y values). It seems to me that programs for phones wich are using Accelerometer sensor are not usable for tablets and viceversa.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…