In standalone application setting I put "portait" as initial orientation, but I also allow all orientations (using mobileSetAllowedOrientations). However the orientation changes correctly only when I rotate the device, but if I open the app landscape it remains "portrait", it doesn't rotate until I start to shake the device . How can I open the app with the right orientation? Which message do I need to send?
Orientation sensor sensitivity is to high, if I incline a little back my device, orientation starts to flick. Is there a way to set a lower sensitivity?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
send a 'resizeStack' message in the openStack handler, assuming that you are using that in conjunction with the orientationChanged message..
besides 'portrait', 'portrait upside down', 'landscape left' and 'landscape right'... you can also handle 'unknown', 'face up' and 'face down' orientation messages. I have used the 'face up' and 'face down' orientations before when experiencing the problems you are seeing.
You solved my second question, I used orientationChanged but for screen orientation is better resizeStack, since orientationChanged uses all three axis (x,y, z), and it is a mess.
About my first question, what code should I write?
on orientationChanged
resizeStack
end orientationChanged
on resizeStack
/* update the screen to suit the change in orientation between 'portrait' & landscape' */
if environment() = "mobile" then
if "portrait" is among the words of mobileDeviceOrientation() then
-- do whatever
end if
if "landscape" is among the words of mobileDeviceOrientation() then
-- do whatever
end if
end if
end resizeStack
EDIT : if you want to send the resizestack then just issue the command 'resizeStack'.