Writing your First BBX Native SDK Project

From the QNX Momentics IDE, select New -> BlackBerry Tablet OS C/C++ Project.

Enter a project name in the field. You cannot use spaces. I recommend something like TestProject-01 or similar so that you can keep creating tests to practice with.

Use the default location for the files, this will be in your Workspace chosen when you first ran the IDE.

Now you will have to choose which type of project it is going to be and what language. For this first project choose C and Empty Application Project.

You may also have to choose if you are going to use the simulator if this is the first project you’ve set up in the IDE. If you have signing keys, now is the time to use them. You won’t be asked for future projects. If you are just going to use the Simulator, then just select that you don’t want to register right now and let’s move on!

Expanded project in BBX Development IDEIf you expand “TestProject-01″ in the Project Explorer, you will see it has Includes, a src foler, a bar-descriptor.xml and an icon (icon.png). The main window is going to show your bar-descriptor.xml file.

We’re going to come back to the Bar Descriptor in the next post. This one is just to get it to run!

Right click on the src folder and select “New File“. In the file name dialog enter main.c

You’ll now have a blank file displayed in your editor. Type in the following lines:

C
1
2
3
4
5
6
7
8
9
10
// Our First BBX Native SDK Program!
#include <stdlib.h>
#include <stdio.h>
int main() {
    fprintf( stderr, "Weeeeeee!" );
    return 0;
}

The two include directives at the top include the standard C libraries.

We add our main function as that is the default starting place for projects. We print something to the stderr output (which is the console in the editor) and return 0 for success!

From the Project menu, select Build Configurations -> Set Active -> Simulator. That tells the project to build for the Simulator which we are going to test on.

Select Project -> Build Project

Then Run -> Run.

If all goes well, you will see the BlackBerry logo appear on your simulator, then the console in the IDE will print out “Weeeeee!” and the program will exit. Notice that you now have an Icon on the Simulator to run TestProject-01 anytime you like.

Getting Your Signing Keys Set up for BlackBerry

This part I found quite frustrating. But here is the process.

First you are going to need to sign up for Code Signing keys. These are two .csj files, one for signing debug builds and one for signing release builds. You can get these from this site: https://www.blackberry.com/SignedKeys/

Once you have signed up you will be emailed the two keys separately. These keys initially are completely useless. You will need to register them with RIM to get to work.

When you create your first project in the IDE you will be asked if you have already registered with RIM. Select the option that you haven’t even though you already have received your two CSJ files.

On the next screen you will be asked to provide the location of the two files as well as the PIN you used to sign up. Enter these as well as a password (create one now).

You will need an internet connection to finish setting up your first project.

Set up your development Environment

If you plan on developing apps for the BlackBerry PlayBook and BBX Platform you will first need a development environment.

RIM has all the tools you’ll need available for download. First you should start by registering as a BlackBerry developer at: http://us.blackberry.com/developers/

Follow the instructions from each page based on your operating system (Windows, MacOS, Linux) to get your development environment ready:

Download and install all of the above applications for native OS development (C, C++).

What is BBX?

BBX is Research In Motion’s next generation platform for their BlackBerry smart phones and tablets, including the BlackBerry PlayBook.

It is a real-time mobile operating system designed from the ground up, but based on existing BlackBerry and QNX operating systems.

The BBX platform will include BBX-OS, and support BlackBerry cloud services. It will have  environments for both HTML5 and native application development.

The good news is, it will support existing applications developed using any of the current tools for the PlayBook. That includes apps developed with the Native SDK, Adobe AIR/Flash or WebWorks.

BBX includes the new BlackBerry Cascades UI Framework for advanced graphics which according to RIM will bring “Super App” capabilities to enable many advanced capabilities including deep integration between apps, always-on Push services, the BBM™ Social Platform, and much more.

This site is designed to help you get started developing applications for the RIM PlayBook and getting ahead of the curve in BBX development.