I believe you can set the autoOrieents to false in the bar-descriptor.xml file in the <initialWindow> section, that would prevent autoOrientation, and fix it to either Portrait/Landscape depending on your attribute setting in the cpp and agk files
<initialWindow>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>
I think there is an additional aspectRatio tag you can set
<aspectRatio>landscape</aspectRatio>
but I'm not sure about this.
Also, if the xml file is parsed at program launch, do these tags override the settings in the agk and cpp files.
In which case do we have to ensure that the attributes in all three files should be set to either landscape/portrait to avoid any conflict??