I have a BlackBerry 10 native app which must run in landscape orientation only. I have the following code in my bar-descriptor.xml under the <qnx> tag:
<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>
However, when I launch the app, it always launches in portrait mode. What else do I need to do to make the app launch in landscape mode?
Turns out that as well as the
<initialWindow>declaration inbar-descriptor.xmlyou must callnavigator_rotation_lock(true)within your app initialisation code in order to tell the navigator that the orientation is locked.http://developer.blackberry.com/native/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_ref/topic/navigator_rotation_lock.html