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
Contributor
Posts: 10
Registered: ‎07-23-2012
My Device: BB Playbook and BB 10 Dev Alpha
My Carrier: Verizon

aspectRatio for Playbook and Dev Alpha

Hi all!

 

I have completed application for BB Playbook and i want to update my application for supporting BB10 Platform and have problem with device orientation. It must to support only horisontal orientation on all devices.

In app.xml file i set aspectRatio none or portrait and it's look good on Playbook , but if i test it on Dev Alpha device it has white borders in up and bottom sides.

Otherwise, if i set aspectRatio landscape it's good on Dev Alpha, but there are white borders on Playbook

 

How can i set portrait orientation for Playbook and landscape orientation for Dev Alpha ?

 

Thanks!

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

Too bad you did not want it the other way and leave that blank and just set autoOrients to false. Because the default orientation for PB is landscape and for BB10 it is portrait. Since you want it the other way, you're going to have to create 2 different BAR files with the edits to the XML config for each. When you sign, you will need to increment the buildId so it will sign without errors.

It might be best to have a release check list so you dont make a mistake with future updates.
Highlighted
Contributor
Posts: 10
Registered: ‎07-23-2012
My Device: BB Playbook and BB 10 Dev Alpha
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

Thanks for answer!

 

But what about releasing of application? I need to create new product with Blackberry 10 settings? Or create a new file boundle in new release of application and download two .bar (for Playbook & Dev Alpha)?

I don't know if it possible to download two .bar files in one release with different settings of orientation. It will be separete, while downloading to device?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

Change the settings in the XML files for the targeted device. Set the build id to say 10. Do the release build, rename the BAR file to something like myapp_203_bb10_signed.bar. Now change the settings for the other device, increment the build id to something like 11, do the release build and rename the BAR file to something like myapp_203_pb_signed.bar.

In the vendor portal, release upload the BB10 BAR file for the BB10 devices. In a separate release, upload the PlayBook BAR file for the PlayBook device.

In theory, the app work checkers should see the difference. There is an upgrade to app world that should be making some of this more obvious.
Contributor
Posts: 10
Registered: ‎07-23-2012
My Device: BB Playbook and BB 10 Dev Alpha
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

Thanks for the detailed answer, i solved my problem.

Very interesting that my problem was only in simulator (if set landscape mode - it good on Dev Alpha and portrait mode - in Playbook), but if set landscape orintation in xml settings and then start application devices it will be display correctly for both - in horisontal position.

New Contributor
Posts: 5
Registered: ‎07-26-2011
My Device: Does it matter?
My Carrier: No, I'm not but thank you

Re: aspectRatio for Playbook and Dev Alpha

Yes, building two separate bars can be an issue later on. When the PB gets granted BB10 down the road (post BB10 release) you would have encountered the same issue when the BB10 bar was available to the devices.

I've been building separate apps for phone / tablet myself though. Easier to control font sizes as the smaller phone has a higher resolution...
...
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

Really depends on the type of app; if their needs to seperate BAR file. The form factor is significantly different for a lot of business apps, that a different GUI for both may be required, which means a different BAR for different devices.
Developer
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: aspectRatio for Playbook and Dev Alpha

Are we talking about future-proofing your BB10 apps? I didn't think the current Playbook could even run a bar file that was compiled with the BB10 SDK ? ... or is that only if you use BB10 specific features?

 

 


My app : Get set - Get up!   Get ready for the snooze revolution.

 

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: aspectRatio for Playbook and Dev Alpha

I think the discussions might be centered around when BB10 SDK becomes available for the PlayBook next spring. Personally, for our apps, the GUIs are just too different in size to just have one app for all devices. We've spent a lot of time to pull out business and data logic into a shared library and then do the best UX for each platform (phone vs. tablet).

But it all still depends. I think game apps are probably the only ones that could just be one app. IMHO.
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: aspectRatio for Playbook and Dev Alpha

The new SDK has been built in a way to allow developers to build responsive applications. The same methodoligies have existed in the HTML5 world for a while now. You can write your UX code to determine a scale or PPI and adjust your UI accordingly. Developing applications like this will definitely take some practice and up front will take a bit longer to develop for. It will pay off down the road though. I believe it's something every developer should eventually learn how to do because of how many different screens are out these days. We are standardizing aspect ratios in the future to make it easier for developers on BlackBerry (especially for game developers).

 

This article by Sarah Northway is a good intro - http://www.adobe.com/devnet/air/articles/multiple-screen-sizes.html 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/