Page 1 of 1

How to detect if device Auto Orientation Mode is activated ?

Posted: Mon Mar 12, 2018 10:35 pm
by teriibi
Hi,

On an android device I´m using this script that allows "rotating" the stack without any user action.

Code: Select all

on preOpenStack
   -- Condition to check whether the environment is mobile
   if the environment is "mobile" then

      --Portrait , Portrait Upside Down , Landscape Left, Landscape Right are the 4 Parameters to be passed in the function iphoneSetAllowedOrientations
      put "portrait,portrait upside down,landscape left,landscape right" into theallowed
   
      -- Function Call
     mobileSetAllowedOrientations theallowed
   end if
end preOpenStack
But, since user might want to keep it in Landscape mode - all the time - I does one detect the device mode settings :?:

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Tue Mar 13, 2018 4:38 pm
by teriibi
So far, I can get the Orientation mode of the stack "Landscape Left" or "Portrait".
but I cant find any command to get access to the Gyroscope Device Environment set by the user.
Is that possible with LC 8. ? or next versions...?

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 1:37 pm
by teriibi
On Android :
it seems that the mobileOrientationLocked does not return the Head Bar Lock state of the device...
but a lock state one chose to define for its stack, or is my stack test failing somewhere ?

Does LC provides a way to get the Lock state AND lock orientation from the Menu bar ?
:?: :?: :shock:

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 4:39 pm
by jacque
I don't think you can get the user lock state. This came up on the mailing list and there was no solution right now.

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 4:41 pm
by teriibi
Ohhhh...tks,
Where can I get this Mailling list subscription ?

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 7:37 pm
by jacque
teriibi wrote:
Wed Mar 14, 2018 4:41 pm
Ohhhh...tks,
Where can I get this Mailling list subscription ?
http://lists.runrev.com/mailman/listinfo/use-livecode/ It's where a lot of the old-timers hang out. The mailing list predates the forums by many years.

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 8:40 pm
by teriibi
Tks Jaqueline - I sent a subscription...
Does it show the same limits for IOs Dev too ?

Re: How to detect if device Auto Orientation Mode is activated ?

Posted: Wed Mar 14, 2018 9:31 pm
by jacque
I don't know, but probably.