Port your Android app to a BlackBerry device

Overview

The process of porting your Android app to a BlackBerry device is relatively straightforward. In many cases, the only change you need to make is to resize your app icon before you submit your app to BlackBerry World. The BlackBerry Runtime for Android apps allows you to target the specifications of the various BlackBerry 10 devices in a single project.

The following sections outline the main differences that you need to consider to bring your Android application to the BlackBerry 10 OS.

Icon sizes

One of the main differences to consider when you port your Android app to a BlackBerry device is the recommended icon size.

These are the icon size requirements for each device:
  • BlackBerry Z30: 96 x 96 pixels (this is optimal, but you can use 114 x 114 and the icon will be resized accordingly)
  • BlackBerry Z10: 114 x 114 pixels
  • BlackBerry Q10 and BlackBerry Q5: 114 x 114 pixels

For more information on adjusting your application icon for a BlackBerry device, see design guidelines for application icons.

Project structure

Store the icon in the correct res/drawable folder for each device:
  • BlackBerry Z30 and BlackBerry Z10: res/drawable-xhdpi folder
  • BlackBerry Q10 and BlackBerry Q5: res/drawable-small folder

Orientation

You should also consider the different display orientations available for your app. BlackBerry devices support portrait orientation and landscape orientation. Portrait is the default orientation, but you can use the accelerometer to detect orientation changes and rotate the display accordingly.

Screen resolution

If your app draws UI elements directly, you need to consider the difference in screen resolution between the BlackBerry 10 devices. Although the BlackBerry Runtime for Android apps scales your app to fit the screen, you should create separate UIs that are optimized for the resolution of specific devices.

These are the screen resolutions for the BlackBerry 10 devices:

BlackBerry Z30 showing the screen dimensions.

BlackBerry Z30: 1280 x 720 (16:9)

BlackBerry Z10 showing the screen dimensions.

BlackBerry Z10: 1280 x 768 (15:9)

BlackBerry Q10 showing the screen dimensions.
BlackBerry Q5 showing the screen dimensions

BlackBerry Q10 and BlackBerry Q5: 720 x 720 (1:1)

Supported APIs

For information on APIs, see the API support page and the Android apps roadmap.

Testing your app

If you would like to test and debug your app without a BlackBerry device, you can use a BlackBerry device simulator.

comments powered by Disqus