Welcome!

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

Adobe AIR Development

Reply
Regular Contributor
Posts: 68
Registered: ‎02-27-2011
My Device: Not Specified
Accepted Solution

Orientation lock

Is it possible to lock the orientation whilst also listening to the orientation events? If anyone has a link to some sample code that would be much appreciated. I'm trying to control a movieclip by rotation of the device but keeping the app locked in a fixed landscape position (like on iOS you have landscape with home button facing down and landscape up...and you can stop it's default behaviour of reorientating between the two)

 

Testing orientation change in the simulator is proving quite tricky as the current method to rotate it also triggers the simulator to bring the apps menu (You get a thumbnail of the minimized app). This would make what I'm trying to do useless... so my other question is does anyone know if this is actual behaviour of the device or a bug in the simulator? 

 

Thanks

 

Highlighted
Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Orientation lock

While orientation change videos are few and far between (and not very informative) we can only assume that what we see in the simulator is a bug, and not the actual behaviour of the device.

 

I know that even with autoOrient set to false, apps will still rotate by using the method you stated above. I would perhaps wait until a more stable sdk or actual device is in your hands to really test this. I know this isn't an ideal solution, but Mark has hinted a new SDK is on it's way (I'm hoping this week, but no one knows.)

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Regular Contributor
Posts: 68
Registered: ‎02-27-2011
My Device: Not Specified

Re: Orientation lock

It's a bit of a catch 22 since I'm trying to get a free device but can't build anything that relies on testing on a physical device. 

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Orientation lock

Personally, I would submit even if some issues were minor. RIM is aware that the simulator is buggy, you just need to make sure that in theory, all you code will work on a physical device. They've said before that apps won't get rejected due to simulator issues. Worst case scenario, they could give you some feedback on what issues they are experiencing on a device and it might help you fix them (even if the feedback is extremely vague)

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Regular Contributor
Posts: 68
Registered: ‎02-27-2011
My Device: Not Specified

Re: Orientation lock

Yes I might just do that. Do you know RIM's turn around time for approval/feedback and whether I still have time to meet the deadline?

 

 

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Orientation lock

[ Edited ]

The approval/turnaround time is completely random, however they have stated that if your app is submitted before the deadline and rejected due to bugs you will get an opportunity to fix them and re submit, even if the deadline has past.

Hmm, it appears I may have misinterpretted what Mark said. You must submit before the deadline to qualify, even if your approval happens after it. Nothing was mentioned about a chance to resubmit after the deadline though.

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Orientation lock

Just so no one comes after me with pitchforks please read my edited post above

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Contributor
Posts: 17
Registered: ‎12-15-2010
My Device: Playbook Emulator

Re: Orientation lock

Okay, I just want to make sure that this is the bug that people are reporting. My descriptor has aspectRatio set to portrait and autoOrients set to false. And the simulator does correctly reorient itself when you launch the game. And it looks like this on simulator 0.9.4.

 

hp1.png

 

And the orientation is indeed locked. If I swipe from the corner, nothing happens. Which is what I want. This is a game that's intended to run in portrait mode only.

 

But if I minimize the game and then swipe from the corner to rotate the main menu screen.

 

hp2.png

 

hp3.png

 

I can now maximize the game with an unwanted (and very ugly) orientation change.

 

hp4.png

 

Am I safe in assuming that you won't be able to force an orientation change like this in the shipping version?

 

Developer
Posts: 342
Registered: ‎09-28-2009
My Device: Not Specified

Re: Orientation lock

I'd also be interested in hearing how you can ensure a locked orientation. This is very important for games.

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Orientation lock

I really think this is just a simulator bug. Watch the sxsw video from the weekend. You'll see the device in app switching mode, portrait orientation, and need for speed hasn't mangled itself to rotate; its 's stayed in landscape mode.
- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -