01-15-2011 05:40 PM
I observed that stage.deviceOrientation always return unknown, but stage.orientation (which is deprecated) is always right. Maybe this is fixed or will be fixed before launch.
One additional thing, code in this example will not work, when you rotate device with minimized application. You should check current state on activation event (guessing here).
01-15-2011 06:53 PM
Jakub, good call on that. I just checked with debug mode and do not see any trace() calls in the event handler when I rotate while the app is minimized.
I also confirmed your not about stage.deviceOrientation returning "unknown", while stage.orientation does appear to be correct, though deprecated.
01-16-2011 01:48 PM
When app is minimized deviceOrientation or orientation are not updated. You may have rotated application which is described as "default" in one of these fields.
Workaround to check orientation after activation is useless for now. Does anybody have better workaround? This looks like a bug in orientation system.
01-16-2011 01:58 PM
I agree that must be a bug. For now then, the workaround would be manual: change orientation twice to get your app back to the proper state.
I'd file it as a bug report, but it's still unclear whether there's any value in doing that. (I mean, we've seen probably a dozen or more new bugs, but filing all of them properly would take me a day and my time seems to be better spent analyzing them and discussing here. QNX folks, please feel free to improve the process by which you deal with bug reports, to fix that.)