I recently had the chance to try my app on the Samsung Galaxy Note.
It's the big brother of my Galaxy S2, so figured it would be smooth sailing, but the orientation was off.
I used the following code to whip up a quick project to try to find the problem.
do
if getRawKeyState ( 27 ) > 0 then exit
print( " Device: " + getDeviceName() )
print( " Width: " + str( getDeviceWidth() ) )
print( " Height: " + str( getDeviceHeight() ) )
print( "Orientation: " + str( getOrientation() ) )
sync()
loop
My S2 reports correctly for all values but the Note doesn't
Note S2
Port Normal 3 1
Port Opposite 4 2
Land Normal 2 3
Land Opposite 1 4
In both cases, they reported the correct width and height and the app was the right way up - just using the wrong dimensions.
So the solution was blindingly simple - if the width is greater than the height then the device is obviously in landscape
// Flag indicating device is in Landscape mode
deviceIsLandScape = ( getDeviceWidth() > getDeviceHeight() )
If the rotation is handled internally by AppGameKit, the only thing the program needs to know is if the device is landscape or portrait.
I can't think why we would need to know which landscape or which portrait it is.