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
thubalek
Posts: 318
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Q10 and Z10 BAR files from one project?

Hello, 

 

I didn't catch whether the same BAR file will be for both Z10 and Q10 or whether I have to create two BAR files.

 

I guess that for Z10 I have to compile project using 10.0 SDK and for Q10 I have to use 10.1 SDK.

 

Are somewhere described best practices how to maintain such a project?

 

Tom

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Q10 and Z10 BAR files from one project?

You *can* create one BAR file for both/all BB10 devices, but you don't have to. You could submit two separate ones if you wanted to do it that way.

For now, I don't think 10.1 will work perfectly on the existing Z10 release, so I assume you would need two separate builds if you were going to take advantage of any 10.1 features. I think you could also use 10.0 to target Q10 but then you'd be missing the Q10-specific features, of course.

10.1 does have some features to make it easier to support custom assets (e.g. .qml files) for different screen sizes. I think for now all you'll find on "best practices" is comments about using those features.

Haven't tried any Q10 stuff myself yet.. I'm just regurgitating some things I learned at the Jam last week.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
thubalek
Posts: 318
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Re: Q10 and Z10 BAR files from one project?

I'm posting this here because I blindly hope that BB is watching this forum.

 

I'm hoping they will write some article regarding this as it seems to be important.

 

I found that adapting existing apps from Z10 to Q10 will be a lot of work (as display of Q10 is really small comparing to Z10) so I would love to make it properly from beginning.

 

I also don't want to send wrong BAR into BB World as review takes so long.

 

So please BlackBerry cover this topic in documentation!

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
Please use plain text.
Developer
Curahee
Posts: 219
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: Q10 and Z10 BAR files from one project?

I wrote my app initially for the Z10 but it worked very good on the Q10 also. It's actually not that hard to create an app for both devices.

 

10.1 provides asset selectors which makes it easy to use other images if necessary.

http://developer.blackberry.com/cascades/documentation/ui/resolution/using_static_asset.html

 

Use 9-slicing if possible. For example, I use a background image for my listview with rounded corners. Because I used 9-slicing, this perfectly fits on the Q10 as well.

http://developer.blackberry.com/cascades/documentation/ui/image_resources/nine_slicing.html

 

You can also take a look at the documentation. BlackBerry wrote an article on how to work with differend resolution devices.

http://developer.blackberry.com/cascades/documentation/ui/resolution/index.html

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
Ebscer
Posts: 855
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Q10 and Z10 BAR files from one project?

The preferred approach is to have a single .bar file for both screen sizes. Using asset selectors is super easy and would be what I recomend.

 

If you want to have two seperate apps this is also possible. Selecting different device support in AppWorld is very straight forwards. Still there are a few things to take note of.

  • First both versions of the app should have identical package names, and be signed with the same keys.
  • In order to sign two .bar files with identical package names with the same keys, you will find that you need to use a different value for the build number for each .bar file.
  • When uploading to AppWorld select the proper devices for each build

Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Developer
Curahee
Posts: 219
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: Q10 and Z10 BAR files from one project?

Although it is possible, I would not go for 2 different bar-files. Maybe BlackBerry will come with other devices and other screensizes. Then you have to create a separate app for that device again... More work right, programmers are lazy :smileywink:. Try to make it as indepent as possible, BlackBerry offers us enough ways to do it effectively.

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
thubalek
Posts: 318
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Re: Q10 and Z10 BAR files from one project?

I'm asking here because there is written

This version is a preview that's created specifically for the upcoming release of the new BlackBerry Q10 smartphone. Apps that you build using this SDK are not compatible with previous releases. If you want to create apps for other BlackBerry 10 devices (including the BlackBerry 10 Dev Alpha), you can find previously released SDKs on the Gold SDK downloads page.

on page http://developer.blackberry.com/cascades/download/beta/

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
Please use plain text.
Developer
bcs925
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: Q10 and Z10 BAR files from one project?

You can compile an app for a z10 using the 10.1 SDK. However if you use an api that didn't come out until 10.1 such as the Picker {} UI element it will not run on 10.0 OS. After Gold 10.1 and/or Q10 comes out and both the Z10 and Q10 are running the same OS it won't be an issue.

For reference I have been doing all my dev in 10.1 and running it on my z10 just fine (as I haven't run into any 10.1 specific api's). So when I submitted my update for Dive Plan I only made 1 .bar, tested it on the Q10 simulator and z10 (actual phone) and they both worked fine.
---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.