How to detect if device Auto Orientation Mode is activated ?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

How to detect if device Auto Orientation Mode is activated ?

Post by teriibi » Mon Mar 12, 2018 10:35 pm

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 :?:

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

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

Post by teriibi » Tue Mar 13, 2018 4:38 pm

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...?

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

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

Post by teriibi » Wed Mar 14, 2018 1:37 pm

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:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4390
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Wed Mar 14, 2018 4:39 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

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

Post by teriibi » Wed Mar 14, 2018 4:41 pm

Ohhhh...tks,
Where can I get this Mailling list subscription ?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4390
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Wed Mar 14, 2018 7:37 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

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

Post by teriibi » Wed Mar 14, 2018 8:40 pm

Tks Jaqueline - I sent a subscription...
Does it show the same limits for IOs Dev too ?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4390
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Wed Mar 14, 2018 9:31 pm

I don't know, but probably.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”