Archive - Tutorials RSS Feed

Attention Android Developers, learn how to convert your APK to a BlackBery 10 app in a few minutes

With the arrival of the new Android Runtime for BlackBerry 10, supporting Jelly Bean 4.2.2, now you can convert pretty much any Android app to a BlackBerry 10 app.

Recently, new tools were also released to help you on that process, they are called BlackBerry Tools for Android Development 2.0 Beta (see details).

Two of the main updates are:

  • No need to download the entire (and heavy) Android SDK
  • Now the command-line tools have a Graphical User Interface (GUI) to guide the developer throughout the conversion process

In this tutorial, you will see all the necessary steps to convert your APK to a BAR (BlackBerry Archive) in order to have you app available in the BlackBerry World application store.

Let’s get started?

Step 1: Click here to download the Command-line tools for Android Apps 2.0.1 Beta (3.3MB)

Step 2: Extract the .zip contents to your computer
Extract the .zip content to any folder in your computer.

Step 2.5: Make sure you have an ID token to sign BlackBerry 10 apps. You need to sign your app if you plan to submit it to BlackBerry World. If you don’t have your ID token already, please follow the two steps below, otherwise just jump to Step 4.

  • Request your BlackBerry ID token here. Choose the first option (“For BlackBerry 10…”) and you will be redirected to the BlackBerry ID login page (create one BlackBerry ID if you don’t have one, you will need to confirm via email, then click back on the link above to login). After logging in with your BlackBerry ID, the next step is to choose a password (keystore) for your BlackBerry ID token (recommendation: choose a simple password such as 87654321 to avoid forgetting it). Then your bbidtoken.csk will be generated and downloaded to your computer. Save the file in the following folder (create the folder if you don’t have one):
    * Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
    * Windows Vista, Windows 7, and Windows 8: %HOMEPATH%\AppData\Local\Research In Motion
    * Mac OS: ~/Library/Research In Motion
  • After having your bbidtoken.csk in the right folder, you will also have to generate an author.p12 file, which will show up beside your bbidtoken.csk file. In order to create your author.p12, from Finder (Mac) or Windows Explorer (Windows), navigate to the folder extracted on Step 2 and find the /bin folder. In there, you will find a guy called blackberry-keytool. With your Terminal (Mac) or Prompt (Windows) opened, drag that guy and release it on top of your terminal window. Then type -genkeypair -storepass -dname “cn=Your Name”.
    The instruction will look like this: “extracted folder path”/bin/blackberry-keytool -genkeypair -storepass -dname “cn=Your Name”
    Press ENTER to run the command and your author.p12 file will show up beside your bbidtoken.csk in the right folder. That’s it! Now you can sign BlackBerry 10 apps and submit them to BlackBerry World. Let’s get back to the porting steps, you can jump to Step 4.

Step 3: Open Terminal on a Mac or Command Prompt on Windows
Mac: click to the magnifying glass (top right on your screen) and type Terminal
Windows: click on START, then RUN then type cmd

Step 4: Open the APK Packager GUI
On Finder (Mac) or Windows Explorer (Windows), navigate to the extracted folder on Step 2 and find the /bin folder. In there, you will find a guy called blackberry-apkpackager. With your Terminal (Mac) or Prompt (Windows) opened, drag that guy and release it on top of your terminal window, then type -gui. It means you will execute the command blackberry-apkpackager passing the instruction -gui to open its GUI (Graphical User Interface, or visual assistant).
The instruction will look like this: “extracted folder path”/bin/blackberry-apkpackager -gui
Hit ENTER and this window will open:

Step 5: Convert your APK
With your GUI opened, select your APK, check the option DEPLOY and then click on the PACKAGE button.

If you don’t want to sign your application, but test it on a BlackBerry 10 device, you will need a Debug Token. To create one and send it to your device, with your GUI opened, click on ADVANCED SETTINGS and with DEVELOPMENT MODE checked, click on the button beside the Author field. Then, with your device connected via USB, click on DEPLOY DEBUG TOKEN.

Step 6: Testing your new app on your BlackBerry 10 device
As soon as the packaging process finishes, the BlackBerry Deploy window shows up:

If you’re connected via USB, remember that the device IP will be, if it’s over Wifi, type the network IP. Type your device password and click on INSTALL.

That’s it! Now you can test your .bar (BlackBerry 10 app) converted from an .apk (Android App) on your device.

If you decide to submit your .bar to BlackBerry World, remember to repeat Step 5, now checking the option SIGN.

Then create your vendor account on, submit your docs and as soon as you’re approved, you will be able to submit your signed .bar and publish your app to the entire community of BlackBerry 10 users all over the world.

If you are an old BlackBerry developer used to keep (and do backups) of your signing keys (barsigner.csk…), that process has changed (as you saw above). Now everything is done with your bbidtoken.csk, which can be downloaded to any computer every time you need to sign apps (just repeat Step 2.5 to get there).

But what happens if I’m an older developer, always did backups of my keys and have apps already on BlackBerry World?
Great question! And the solution is very simple, you just need to link your new bbidtoken with your old barsigner.csk, once.

Having problems converting your APK?
In a few cases, APKs can have execution problems, because they use some native core Android services. In the case of maps, the MapView v2 won’t work, and the solution is: 1) use MapView v1, or 2) replace your map with a WebView and use Google Maps with HTML5.

Good luck and happy porting!

Convert any SWF into a BlackBerry 10.2 Application (GAP for AIR)

Important: This is not an official BlackBerry tool and there is no plan to provide support or updates. Use it at your own risk.

Hello fellow Flash developers! This is Demian Borba (@demianborba), BlackBerry Developer Evangelist and I’d like to share something special with you all.

Normally, to convert SWFs into for BlackBerry 10 apps, you have to use the command line, which is not very comfortable and productive for some developers, myself included. You can also use IDEs, but sometimes you want to just use a simple GUI tool.

With that in mind, the Tech Center Maceio in Brazil and I designed/developed a visual tool for the desktop (Mac and Windows) called GAP (Graphical Aid Plus) Alpha for AIR, which executes all the command line instructions under the hood.

As you might know, BlackBerry 10.2 now supports Adobe AIR 3.5, which includes Stage3D and StageVideo, great APIs for games and video. With GAP Alpha for AIR you can convert any SWF into a BlackBerry 10.2 application.

Let me tell you how it works!

1. Download and Install GAP

Before you download GAP Alpha for AIR, please make sure you download and install the current BlackBerry 10 SDK for Adobe AIR.

Download GAP Alpha for AIR (Mac Version, 29.9MB)
Download GAP Alpha for AIR (Windows Version, 22.9MB)

Once you have GAP installed, you will be able to (visually):

  • Request signing keys
  • Register signing keys
  • Backup signing keys
  • Restore signing keys
  • Create and install debug tokens
  • Create BB10 apps from any SWF
  • Install .bar files in the simulator or any device

Continue Reading…

Wow! No more re-packaging when testing HTML5 apps on your device

If you are a HTML5 developer targeting the BlackBerry platform, you know that for creating apps and testing on devices you have 2 options:

A. Use a visual tool like “Graphical Aid Plus Alpha for HTML5″ (details here)


B. Use command line:
1. Select all of your files (CSS, JS, HTML and any other local files like videos, mp3s, images etc, INCLUDING the config.xml file)
2. Zip all these files
3. Run bbwp to PACKAGE and SIGN your application
4. Use blackberry-deploy to install the app on your device
* If you need to remember all these steps, we have short video tutorials here.

And if you do changes to your app and need to test it again on your device, you need to increase the buildId and repeat ALL these steps again. Painful, right?

Not anymore! Let me show you how you can avoid repackaging over and over again, every time you have changes to your app:


Normally on your config.xml file, you have the first file that opens (i.e. index.html) defined in the tag “content” with the attribute “src”:

The good news is that you can point this index.html to be a local file on your server or computer (i.e. When using Wifi, my computer IP is When connected via USB, my computer IP is

But you can’t forget to whitelist your computer or server, by adding this to your config.xml file:

To get live updates on your device (without having to refresh, close or open the app) you can get LiveReloader for just 9.99 dollars and install on your computer. With that in place (after adding the JS code to your index file), as soon as you hit SAVE on your computer, it will update the app on your device, automagically!!

Now you can package for the last time, and do all changes on your computer.

And when you have your app all set, remember to remove the IP and set it back to index.html before submitting it to AppWorld.

Good luck and happy coding!! #GoBB10 GoHTML5

Changes in bbUI.js, getting your Context Menus to work

Hello everyone, I’d like to share some recent changes that affect the way we work with bbUI.js.

I found out about it the hard way :) To be honest, I always download the Samples App from GitHub to show devs how amazing bbUI.js is in terms of performance for mobile. Lists fly, transitions are great, in some cases you can’t tell the app was built using HTML5. The biggest difference is that every time a screen pops out, it gets destroyed. When it needs to be displayed, bbUI.js creates it from scratch. Some people don’t like it, I’m ok with that, specially because it has methods to jump vertically to a specific place in a window (when you show a list for example).

Continue Reading…

Are you a developer working with HTML5 and/or AIR? New to BlackBerry 10 development? This is for you!

My presentation at Jam Europe is live now, as well as all the presentations (view all).

Learn how to set up your environment in 45 minutos, for HTML5 development and AIR development.

In the video, you will see how to:

• Ask for signing keys
• Download the right SDKs
• Install the right SDKs
• Register your computer with your new signing keys
• Find sample Apps using HTML 5 on Github
• Find sample Apps using Adobe AIR on Github
• Package and sign your applications
• Deploy your App to BlackBerry 10 devices and debug it
• Publish you App on BlackBerry World

Workaround for AS3 Developers using FDT to create BlackBerry 10 Apps

If you recently tried to install the BlackBerry 10 SDK for Adobe AIR to work with PowerFlasher FDT and got stuck during the installation process:

Don’t panic, there is a workaround:

- Install SDK 3.1 without FDT integration
- Open FDT and go to Help -> Install New Software
- On the dialog, click button Add
- The “Add Repository” dialog will be displayed, press “Local” button
- Point to where your BlackBerry Tablet SDK is, e.g. for the Mac: /Applications/Research In Motion/blackberry-tablet-sdk-3.1.0/update_site_for_AirCommon/
- Give any name to the repository and Press OK.
- Follow the installation instructions
- After restarting FDT, you will be able to create Blackberry Project

It’s beautiful to see FDT and our BlackBerry SDK beautifully integrated:

Good luck and happy coding!

How to set up your environment to create HTML5 and/or AIR Apps in 45 minutes (STEP 1)

Link to ask for Signing Keys:

How to set up your environment to create HTML5 and/or AIR Apps in 45 minutes (STEP 2)

Link to download the BlackBerry 10 WebWorks HTML5 SDK:

Link to download the BlackBerry 10 SDK for Adobe AIR:
* To finish the installation process, you will need AIR SDK 3.1 or lower downloaded to your computer. Flex SDK 4.6 has the version of AIR we need, download it from here:

How to set up your environment to create HTML5 and/or AIR Apps in 45 minutes (STEP 3)

* During the BlackBerry 10 SDK for Adobe AIR installation process, make sure you point the location of the Adobe AIR SDK to the root of the FLEX 4.6 folder.

How to set up your environment to create HTML5 and/or AIR Apps in 45 minutes (STEP 4)

Save the keys (PBDT and RDK) that come in 2 emails:

You can register your new keys using command line:

Or you can use BlackBerry Graphical Aid to register your new keys (visual, no command line).

Link to download BlackBerry Graphical Aid:

Setting up BlackBerry Graphical Aid:

* BlackBerry Tablet OS SDK is where the BlackBerry 10 SDK for Adobe AIR is (normally in /Applications for the Mac and /ProgramFiles for Windows).

* Every time you register new keys, I recommend you to generate a new certificate (author.p12). Location of your p12 certificate after it is created:

Page 1 of 212»