Getting Orientation Enforced on Phone

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
# using this method to change stack

go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 of "gems"
 wait 100 milliseconds with messages
 close stack oStackName
 wait 100 milliseconds with messages

# don't try to go in same window method

( we used "set the fullscreenmode of this stack to "showAll"  in all stacks)

Now, we can get orientation "enforced" on iOS going one way -- portrait to landscape --

but not coming back for  -- landscape to portrait --

Users sees the bottom on the portrait, until right they phone upright)

Android is worse, the landscape stack is rendering horizontally on a portrait screen until they rotate the phone.
and vice versa

I really need to phone to "enforce" , regardless of phone is held.

You can't have a game/map (landscape) open "miniaturized" by portrait

      mobileSetAllowedOrientations  "landscape left,landscape right"
OR
      mobileSetAllowedOrientations  "landscape left,landscape right"

the dictionary says

"the setting take affect the next time an orientation change is applied"

But it is enforced to iOS going for portrait to landscape. Why not to other way?
And either way on Android

Has anyone solved this problem.
BR

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
BR,

I've tried everything. It's gets even more bizarre. The last time I tested
this is what I got:

iOS: LC respects the device's orientation lock.
Android: LC does NOT respect the device's orientation lock.
iOS: If the LC app is in portrait, iPhone/iPod will change orientation
without rotating the physical device if mobileSetAllowedOrientations set to
only landscape(like Netflix) and lock it there. On iPad LC will not force
the rotation and will not lock it if you rotates the device.
Android: LC will not force the rotation but will lock it if you rotate the
device.

To fix this right we need:
1) mobileSetAllowedOrientations should be just that. This should be a end
user rotation permissions.
2) Add new==> mobileSetOrientation (pOrientation,
pRespectDeviceOrientationLock {true|false})

That's it. Until LC does this, we'll have a mishmash of behaviors and wrong
card rendering. Playing with all sorts of waits is just madness.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Sannyasin Brahmanathaswami via use-livecode
Sent: Tuesday, April 10, 2018 10:40 PM
To: How LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Getting Orientation Enforced on Phone

# using this method to change stack

go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 of
"gems"
 wait 100 milliseconds with messages
 close stack oStackName
 wait 100 milliseconds with messages

# don't try to go in same window method

( we used "set the fullscreenmode of this stack to "showAll"  in all stacks)

Now, we can get orientation "enforced" on iOS going one way -- portrait to
landscape --

but not coming back for  -- landscape to portrait --

Users sees the bottom on the portrait, until right they phone upright)

Android is worse, the landscape stack is rendering horizontally on a
portrait screen until they rotate the phone.
and vice versa

I really need to phone to "enforce" , regardless of phone is held.

You can't have a game/map (landscape) open "miniaturized" by portrait

      mobileSetAllowedOrientations  "landscape left,landscape right"
OR
      mobileSetAllowedOrientations  "landscape left,landscape right"

the dictionary says

"the setting take affect the next time an orientation change is applied"

But it is enforced to iOS going for portrait to landscape. Why not to other
way?
And either way on Android

Has anyone solved this problem.
BR

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode


> On 14 Apr 2018, at 10:45 am, Ralph DiMola via use-livecode <[hidden email]> wrote:
>
> To fix this right we need:
> 1) mobileSetAllowedOrientations should be just that. This should be a end
> user rotation permissions.

I have had a brief look at this worked out what needs to be done. Hopefully we can do this next sprint for 9.0.1.

> 2) Add new==> mobileSetOrientation (pOrientation,
> pRespectDeviceOrientationLock {true|false})

I guess rather than this we could fix #1 and ensure that all platforms respect the system orientation lock unless it is not in the allowed orientations given if you are forcing an orientation you would need to fiddle with allowed orientations anyway.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
In my MobileProfile demo app it seems to respect the lock properly on
iPhone (can only user lock to portrait). Sounds like something that would
be good to do additional testing on. Is there any way to test pre-release
engine changes on iOS?
On Fri, Apr 13, 2018 at 8:54 PM Monte Goulding via use-livecode <
[hidden email]> wrote:

>
>
> > On 14 Apr 2018, at 10:45 am, Ralph DiMola via use-livecode <
> [hidden email]> wrote:
> >
> > To fix this right we need:
> > 1) mobileSetAllowedOrientations should be just that. This should be a end
> > user rotation permissions.
>
> I have had a brief look at this worked out what needs to be done.
> Hopefully we can do this next sprint for 9.0.1.
>
> > 2) Add new==> mobileSetOrientation (pOrientation,
> > pRespectDeviceOrientationLock {true|false})
>
> I guess rather than this we could fix #1 and ensure that all platforms
> respect the system orientation lock unless it is not in the allowed
> orientations given if you are forcing an orientation you would need to
> fiddle with allowed orientations anyway.
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
Monte:  "there is a God in LC Universe!"

 9.0.1  

I can live with that.. hopefully sooner than later. If you don’t there soon I will be forced to a horrible notice

"Please turn phone"  and end of change of stacks.

Like Ralph said "using wait is madness"

(but using wait is for a different purpose. On android, acceleratedRendering, when you turn it in off in one stack and go another stack, you have to give the phone time (does not happen on iOS)  otherwise "all hell breaks loose" (snap shot of previous screen shot, different part of screen show different parts of two stack, where on earth are pixel are coming from the stack who is closed and the acceleratedRendering is false  -- is "magical"  … only by introducing wait fill work.)

BR

    >1) mobileSetAllowedOrientations should be just that. This should be a end
    >user rotation permissions.
   
    I have had a brief look at this worked out what needs to be done. Hopefully we can do this next sprint for 9.0.1.
   
    >2) Add new==> mobileSetOrientation (pOrientation,
    >pRespectDeviceOrientationLock {true|false})
   
    I guess rather than this we could fix #1 and ensure that all platforms respect the system orientation lock unless it is not in the allowed orientations given if you are forcing an orientation you would need to fiddle with allowed orientations anyway.

  Cheers Monte

======
Yes, agreed. I can’t  think of another use case.

• portrait
• portrait upside down
• landscape left
• landscape right

Or

portrait, portrait update down
landscape right, landscape life

should lock it in not matter how the phone is physically oriented

and if some developer wants to play with geometry, they can "fiddle" all they want with:

mobileSetOrientation portrait, portrait upside down, landscape left, landscape right

NOW than said

go  cardOrStackObject  # a landscape stack
wait 100 milliseconds with messages

close stack oStackName # portrait stack
wait 100 milliseconds with messages

I think will cause problems, unless the user turns off mobile orientation temporarily (HA! maybe I will try it)

So… if you can get this work

go "card 5 of  stack NewStackB" in window "OldStackA"

  -- with the orientation lock enforced, that will be ideal.

also secondarily

I would make a global preference

"acceleratedRendering is to false on closing off stack"

so that we don't have keep fiddling with it all the time.
It clear that it needs to turned off.

 The new stack… whether you it on or not, is up to you.

BR


 


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
BR: just completed test.

I tried "go letting"  to stack

   mobileSetAllowedOrientations "portrait,portrait upside down,landscape left,landscape right"
 
just before closing in and opening the next stack.  

No go an Android.

Next I wondered by the portrait turn up portrait in iOS?  Well I look like it did in openStack

on preOpenStack
   wait 100 milliseconds with messages
end preOpenStack
on openStack
   set the fullscreenmode of this stack to "showAll" -- better for wider screens
   mobile_SetAllowedOrientation "portrait"
   set the acceleratedRendering of this stack to true
end openStack

---

So I went to landscape then, which had it preopenstack handler, and I change it to openstack handler

results

iOS : It complied, go orientation landscape back to portrait BUT
complete, going to portrait to land scape. The was enforced (to landscape)
but location the background image was off !
and I have set in to image

   set the loc of img "bgImage" to the loc of this cd

Android: Did not compiled until we manually rotated and the bkground image was off is the name offsets and iOS.

GIT stash!  back to where I was before.

   9.0.1  
   
    I can live with that.. hopefully sooner than later. If you don’t there soon I will be forced to a horrible notice
   
    "Please turn phone"  and end of change of stacks.
   
   

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Getting Orientation Enforced on Phone

Mark Wieder via use-livecode
Eureka! Montes been busy, but keeping quiet

https://quality.livecode.com/show_bug.cgi?id=19465

    BR: just completed test.
   
    I tried "go letting"  to stack
   
       mobileSetAllowedOrientations "portrait,portrait upside down,landscape left,landscape right"
    just before closing in and opening the next stack.  
   
    No go an Android.
   
   

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode