Android Sim Orientation Settings Not Working

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
McJazz
Posts: 111
Joined: Sun Apr 04, 2010 5:59 am

Android Sim Orientation Settings Not Working

Post by McJazz » Sat Jul 09, 2011 10:14 pm

I must have missed something. No matter what setting I make, the sim 2.3.3 or 3.1 always displays in a portrait format. Please help.

on preOpenStack
mobileSetAllowedOrientations "landscape left"
end preOpenStack

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Android Sim Orientation Settings Not Working

Post by townsend » Sat Jul 09, 2011 10:34 pm

I read somewhere that the PreOpen doesn't have the width and height set yet.

So I tried it in: on OpenStack...end OpenStack, but got a missing Handler error.

Hey-- where's all these "Mobile" commands? They're not in the dictionary.
Or is that a user written Handler?

SparkOut
Posts: 2458
Joined: Sun Sep 23, 2007 4:58 pm

Re: Android Sim Orientation Settings Not Working

Post by SparkOut » Sun Jul 10, 2011 1:46 am

At the moment all the mobile platform specific commands and functions and features are in the Android Release Notes or iOS Release Notes.
You should be able to find them under the Help menu in the IDE. (Unless you are not on a Mac in which case you won't have the iOS ones).

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

Re: Android Sim Orientation Settings Not Working

Post by jacque » Sun Jul 10, 2011 9:15 pm

McJazz wrote:I must have missed something. No matter what setting I make, the sim 2.3.3 or 3.1 always displays in a portrait format.
What version of LiveCode are you using? There was an orientation bug on Android that was fixed in 4.6.2. The release notes say it affected tablets, if you're using one of those.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Android Sim Orientation Settings Not Working

Post by townsend » Mon Jul 11, 2011 6:41 pm

I'm using 4.6.2.

I think I've got the code right. Still-- same problem.

Code: Select all

on preOpenStack
     if the environment is "mobile" then
          mobileUnlockOrientation
          mobileAllowedOrientations("landscape right, landscape left")
          mobileLockOrientation
     end if
end preOpenStack
My App is designed for landscape only orientation. At start up, the device orientation is in portrait, so my stack is appears severely clipped. Then when I press Ctl-F12 to change the device orientation of landscape, the stack orientation is locked in portrait, and still severely clipped.

I also have this code on a button.

Code: Select all

on mouseUp
     put empty into field "look.here"
     if the environment is "mobile" then
          put mobileDeviceOrientation() into field "look.here"
     end if
end mouseUp
And the result is always "Portrait", even when the device, in the Simulator, is in landscape orientation.

PS: Also, the simplest app, with a 480x320 stack, with nothing but a big Hello World label, also has the same problem. Different Simulator configurations? Tried that too.

rearview
Posts: 4
Joined: Thu Mar 31, 2011 8:49 pm

Re: Android Sim Orientation Settings Not Working

Post by rearview » Mon Jul 11, 2011 8:07 pm

BTW - I am having the same issue as townsed.
No matter what I do the program is always in portrait.
I am also running 4.6.2

Thanks Shane

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Android Sim Orientation Settings Not Working

Post by townsend » Mon Jul 11, 2011 8:19 pm

Glad to hear I'm not alone on this!

I'm developing on Windows 7, with a 4.6.2 Commercial license.

Also-- tested on 4.6.1, with the same results.

rearview
Posts: 4
Joined: Thu Mar 31, 2011 8:49 pm

Re: Android Sim Orientation Settings Not Working

Post by rearview » Mon Jul 11, 2011 8:28 pm

I am very new to livecode so i keep thinking that I am missing something (usually that is the case lol)
Same program works like a charm on iOS (iPad).

Also one other weird issue some of the graphics that look perfect on all other os's are blue on android.
but that is another problem.

Shane

Post Reply

Return to “Android Deployment”