Everything You Need to Know About the BlackBerry Z30

Adobe AIR Development

Here’s Jorge Fernando Vazquez with everything you need to know to get your apps ready for the BlackBerry Z30 smartphone – Ed.

TITLE_IMAGE

The new BlackBerry Z30 is a full touch-screen device that introduces some changes that you need to consider as a developer.

In this post, I will start by pointing out some of the differences between the BlackBerry Z10, BlackBerry Z30 and BlackBerry Q10 smartphones, and then I’ll show you how to make the porting process as easy as possible for each of our development platforms (Cascades, WebWorks, Adobe Air, and Android).

Know The Differences

graph1

As you can see, the BlackBerry Z30 display is larger and has a more narrow aspect ratio than the BlackBerry Z10, therefore, we need to be careful while designing our apps so that there are no cropped images, or overlapping components.

graph2

The camera features are the same across all three devices, so there is no need for adjustments there.

graph3

The BlackBerry Z30 comes with a more powerful processor than the BlackBerry Z10 or BlackBerry Q10, giving us higher graphics capabilities.

graph4

All other features are common across all three devices, the exception being that the BlackBerry Q10 has a physical keyboard and the others have a full touch screen.

The Porting Loop

graph5

To port your app over to the BlackBerry Z30, start with the BlackBerry Z10 implementation of your app and test it on the simulator or a device. The best case scenario is that your UI and images scale appropriately to the new screen size. In this case, you can probably get by with making only some small tweaks or optimizations to take advantage of the larger screen. Worst case scenario is that your UI doesn’t adjust to the new screen size,  and you will need to adjust the layouts and assets. Once all modifications are complete, retest the app on the device or simulator. Repeat as necessary until you are ready to deploy.

Cascades

Now we’ll take a look at some of the basic considerations you need to take when using Cascades, in regards to layouts and assets.

Regarding layouts, there are three major tools that a developer can use to make the UI adapt easily:

  • Relative layouts: The framework arranges the components relative to the boundaries of the screen.
  • Margins and padding: Provides a space, or buffer between child components and their parent containers.
  • Space quota: Designates a proportion of the available space to a component.

graph6

The images above show the same QML file being displayed on different devices and orientations.From left to right, an all-touch device in portrait, an all-touch device in landscape, and a device with a physical keyboard.. By using relative layouts with margins and space quotas, you can see how the UI is able to adjust appropriately for each screen size.

Images are the other major factor to have in mind while adapting from one screen size to another

  • If using generic images, make sure they scale uniformly, so when a new form factor is introduced, the images can adapt properly.
  • If you need assets designed specifically for a particular resolution (or a theme), use the static asset selector. When your app is launched, the asset selector looks for assets designed specifically for that device. If it doesn’t find any, the default set of assets is used. Make sure you always have a set of default assets so that your app is compatible with future form factors. For more information on this, see Using the static asset selector.

The following image represents a basic example of how to use the assets selector. The project contains:

  • A single icon which is used for all devices.
  • Splash screens, one for  720×720 devices,one for 720×1280 devices, and a default version at the root of the assets folder. The assets in the resolution subfolders override the default version.
  • A .qml file called SecondPage.qml for each different resolution.
  • A default main.qml file that’s used for all resolutions.

graph7

For further information, please visit:

The BlackBerry Z30 comes with version 10.2 of the BlackBerry 10 OS, so keep an eye out for some of these new features:

WebWorks

There are a series of recommendations that should be taken into account while working on WebWorks, not only while porting, but at all stages of development. These will help you when you need to make future modifications.

  • Adhere to CSS Best practices:
    • http://developer.blackberry.com/html5/documentation/css_best_practices.html
    • Use templates when needed for different screen sizes.
    • Use the Web Inspector to analyze, optimize and reorganize your layouts:
      • Try using Stack or Flexible layouts as much as possible, so that the framework can control the positioning of the element in relation to the boundaries.
      • Pay attention to background and full screen images, and rethink their usage.
      • Make UI components semi-transparent if they overlap with critical content.
      • Adapt the color scheme.

As in Cascades, there are some upcoming features in 10.2, the major one being the Cordova Alignment. For details on timing and the full listing of upcoming APIs, visit https://developer.blackberry.com/html5/download/roadmap/.

Adobe Air

There is a small series of recommendations to be done while working on Air that all developers should pay attention to:

              <splashScreens>
                       <image>splash-1280x768.jpg</image>
                       <image>splash-1024x760.jpg</image>
                       <image>splash-720x720.jpg</image> 
              </splashScreens>

In 10.2 the major update for Adobe Air is the introduction of the 3.5 runtime, which is now available in the current 10.2 SDK beta: https://developer.blackberry.com/air/download/. For more details on timing and the full listing of upcoming APIs, visit: https://developer.blackberry.com/air/download/roadmap/

Android

The Android platform already has support for different screen resolutions, so we should take advantage of that as much as possible. The general recommendations are to:

  • Use resolution specific folders for resources
    • Android supports different folders for different resolutions, similar to Cascades. Make use of this.

graph8

In 10.2 we‘ve gotten a major update to the Android runtime, moving to Android 4.2.2 Jelly Bean (API level 16). Jelly Bean is now available in the current 10.2 SDK beta: https://developer.blackberry.com/android/tools/

For details on timing and the full listing of upcoming APIs, visit: https://developer.blackberry.com/android/tools/roadmap/

Publishing

When you are ready to deploy your app, here’s how you can upload the new bundle to BlackBerry World:

  • Go to the Vendor Portal for BlackBerry World.
  • Select Manage my products.
  • Select your app from the list of products.
  • Add a new file bundle.
  • Under Supported platforms, select the platform specific to this bundle.
  • Once you’re finished, BlackBerry World will handle the delivery of the designated bundle to the correct device.

About Brian Z.

Brian joined Research In Motion (RIM) in 2005 working with Independent Software Vendors (ISVs) who specialize in Bluetooth, GPS, multimedia, and gaming. As a senior member of the Developer Relations Team, it's Brian's mandate to not only support the application development efforts for a number of ISVs, but also to act as a voice at RIM for third party application developers. Like RIM, Brian's roots are in the enterprise world, but over the past couple of years he's quickly adapted to the consumer space, and that's where he spends most of his time today.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus