03-12-2012 07:46 PM
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?
Solved! Go to Solution.
03-12-2012 07:50 PM
windows xp sp3
vmplayer 3.1.5 build-491717
native sdk for tabletos1.0 bbndk-1.0.7.3312-win32
simulator installer 1.0.8-6067-win-20111205
03-13-2012 03:42 PM
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
https://bdsc.webapps.blackberry.com/native/downloa
Your simulator should be 2.0.0.7971 (BlackBerryPlayBookSimulator-Installer-2.0.0-7971-
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 :
https://bdsc.webapps.blackberry.com/native/samplea
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)
https://github.com/blackberry/NDK-Samples/tree/mas
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.