I want to get orientation


This topic is not helpful to me

My app is a Landscape app (Orientation = Sensor Landscape)

My Problem:
On Screen1, if the orientation is reverse landscape and and phone is flat / kept on table (Phone is facing top / to the sky)
On opening, Screen2 is rotating and orientation becomes normal landscape

So I want to open Screen2 with StartValue=Orientation and On.Screen2.Initialize Set Orientation to Start Value

How to get current orientation information of screen and not the informtion from sensor

the answer was in that thread you mentioned…


Taifun

2 Likes

@Taifun I want to get current screen orientation
Like landscape, reverse landscape

try one of the sensors…

  • Accelerometer
  • Orientation Sensor
  • Gyroscope

see also


Taifun

1 Like

@Taifun please read this again…

this gives you some information, but not as detailled as you need it

if width > length then “landscape” else “portrait”

for more details try one of the sensors as already mentioned

Taifun

Again…I don’t want to get Sensor information
I want to get Screen orientation information
Like
Landscape (front camera will be at left side)
ReverseLandscape (front camera will be at right side)

orientationTest.apk (4.8 MB)

1 Like

I had tested your .apk
Please do this

  1. Open app (Screen 1)
  2. Tilt your phone as reverse landscape (front camera will be at right side)
  3. Now place your phone on a flat area, Screen facing the Sky/ Ceiling
  4. Now press open Screen2

Problem: Screen is rotating to normal Landscape

I have tested your apk … it’s perfect … how you did you get the correct orientation on label … what I really what equation (blocks) you have put to get the screen orientation either on opening or changing the orientation…
Thanks in advance

I have tested it again now.
I don’t remember how I tested 9 months ago.

Yes it is working perfectly.

How @Boban ?

@drpeterramsis2007
@sonumohammad333

You were lucky as I still had it on creator, here it is orientationTest.aia (5.0 KB)

3 Likes

many many thanks @Boban