Port your Android app to a BlackBerry device
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.
One of the main differences to consider when you port your Android app to a BlackBerry device is the recommended icon size.
- 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.
- BlackBerry Z30 and BlackBerry Z10: res/drawable-xhdpi folder
- BlackBerry Q10 and BlackBerry Q5: res/drawable-small folder
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.
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: 1280 x 720 (16:9)
BlackBerry Z10: 1280 x 768 (15:9)
BlackBerry Q10 and BlackBerry Q5: 720 x 720 (1:1)
Testing your app
If you would like to test and debug your app without a BlackBerry device, you can use a BlackBerry device simulator.