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

Native Development

Reply
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Allow and Portrait and Landscape Camera on a Portrait Only App

I'm reading that card orientation follows the main apps orientation. So if the main is locked to portrait the camera card will follow suite.

 

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/creating_ca...

 

"When you create cards, you must add support for both landscape and portrait orientation so that the card follows the orientation of your application."

 

Is there a way to enable orientaiton within the card by passing in a setting?

 

Or alternatively maybe I could not lock the app in the BarDescriptor but instead lock the app on startup and then unlock when a card is shown. Obviously the first option would be prefered.

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
Retired
PBernhardt
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Allow and Portrait and Landscape Camera on a Portrait Only App

The UI stays locked unless you do something like the second option. Images should get captured in the correct orientation in newer builds regardless though ("newer builds" being 10.2 or 10.2.1, I don't remember)

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Allow and Portrait and Landscape Camera on a Portrait Only App

[ Edited ]

(10.2+)just to note, videos are not being recorded in the proper orientation if the camera is opened in landscape mode.  The videos will record in portrait unless the user rotates the device to portrait and then back to landscape

Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Allow and Portrait and Landscape Camera on a Portrait Only App

@PBernhardt do you know what I would use to modify the orientation lock from within the app?
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Allow and Portrait and Landscape Camera on a Portrait Only App

I belive you should be able to use SupportedDisplayOrientation to switch the current supported orientation from within your application

 

https://developer.blackberry.com/native/reference/cascades/bb__cascades__supporteddisplayorientation...

Please use plain text.