Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 28
Registered: ‎02-10-2012
My Device: playbook 4G/LTE
My Carrier: none
Accepted Solution

GoodCitizen example Orientation events in Simulator v1

okay, anyone actually get GoodCitizen to work with landscape/portrait changes in the simulator?


first off, i had to add  "<autoOrients>true</autoOrients>"

to the bar-descriptor.xml to even get orientation events received by the app.

not an auspicious start for an "example" app.


if you start the app in landscape mode, then do an angular upsweep from the bottom right

it rotates, but creates a small greyish window on the bottom of the screen and you do not

see the rotating cube.

if you re-swipe from the bottom-right it returns to landscape mode and things/cube work again.


if you start the app in portrait mode, the screen is totally black, no small greyish window even.

a swipe to rotate gets you into a working fine landscape mode.


i put a fprintf(stderr, "surface_width=%d, height=%d\n"...

into the resize() function, and regardless of orientation you *always* get a surface width

of 1024 and height of 600. this doesn't seem correct either.


so, anyone actually get this GoodCitizen to be good with orientation in the v1 simulator?



Posts: 28
Registered: ‎02-10-2012
My Device: playbook 4G/LTE
My Carrier: none

Re: GoodCitizen example Orientation events in Simulator v1

windows xp sp3

vmplayer 3.1.5 build-491717

native sdk for tabletos1.0 bbndk-

simulator installer 1.0.8-6067-win-20111205


Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: GoodCitizen example Orientation events in Simulator v1

Good afternoon dnp.


Couple of notes on your post.


1. You seem to have a rather ancient version of things. Please go to this URL and download the latest SDK and Simulator builds




Your simulator should be (BlackBerryPlayBookSimulator-Installer-2.0.0-7971-Win-201202221232.exe) and SDk should be 7971 as well (installer installer-bbndk-2.0.0-win32-7971-201202171813-201202181253.exe).


2. I am guessing that you created a GoodCitizen project through IDE. I ran a quick test like this myself and noticed that bar-descriptor.xml does not have a correct <initialWindow> settings when a project is created through the IDE or downloaded from here :




So, thank you very much for bringing this to my attention. I have contacted the team that is responsible for maintaining these two locations and they will be fixing this shortly.


For future reference, there is a github repo that features all of the native samples. It has all of necessary bar-descriptor flags (as this repo is maintained by actual sample authors)




So, to quickly sum things up - update your sdk and simulator, get the correct GoodCitizen off the github and things will work. Meanwhile we'll fix the IDE and devportal samples.


And let me know if you have further issues with this.