PlayBook add-on (ofxQNX)

PlayBook add-on (ofxQNX)

After receiving my BlackBerry PlayBook through the developer offer in March, I started to think of the possibility of porting NodeBeat to the PlayBook platform.

As this is my first tablet (yea I know, as a multitouch enthusiast its quite weird not having an iPad or Android Tablet), I have to say that I am really enjoying the 7 inch form factor. It feels much nicer in the hand compared to most of the larger tablets (10+ inch) which can tire out your wrists quite a bit. Spec wise this device is great (dual-core cpu, 1 GB ram, dedicated graphics chip), therefor it would be nice to test if the PlayBook would be a perfect platform to run NodeBeat on.

Since I am already quite familiar with the NodeBeat code base, this would be a nice new challenge. After taking a brief look at the Native SDK, I figured that this would not be as difficult compared to the Android port. Unlike on Android, there is no need for JNI bindings. Actually, I would say that developing for the PlayBook is very similar to writing applications for Linux (you can use Makefiles if you want), the compiler (qcc) is quite similar to gcc.
RIM includes a modified IDE (based on Eclipse) for app development and it works quite well. All the required tools are tightly integrated and the wizards help you to get through the setup. RIM also did a good job on documenting the Native SDK, including the documents on porting.


NodeBeat is build on top of the popular openFrameworks (OF) platform, so the first thing I had to do was find out which dependencies I had to build to make it work and write an PlayBook add-on (ofxQNX) to extend the current framework.

At first sight, this seemed to be quite a difficult task due the amount of dependencies OF relies on and the large code base I had to patch, but with help from the openFrameworks community and BlackBerry community, it fortunately did not take long before I had some stuff up and running.

I won’t bore you guys to death with the details on how to get the dependencies compiled using the NDK as most of them worked straight out of the box (in the readme are some details on what to patch). The ones that were troublesome and caused me a lot of frustration were the ones that use custom build scripts (yes you POCO). I am sure those devs have a valid reason for using it, but it makes things a bit overcomplicated. In the case of POCO, the QNX build (PlayBook target) could only be build on a Linux machine. I ended up installing Ubuntu in VirtualBox to compile FreeImage and Poco.

It was worth the effort though as I managed to get OF run properly on my tablet:

Where to get it?

Details about the project can now be found here: ofxqnx

The ofxQNX add-on is available on GitHub, in the developPlayBook branch:

It is licensed under the New BSD license and hopefully will become part of the mainstream branch. For now I will maintain it in my own OF fork as quite a lot of the OF core had to be patched.

Included are ten example projects that explain how to use various features of ofxQNX. All project files contain settings for development on the Simulator (x86) as on the PlayBook/BB10 hardware (ARM).

Is it ready for prime time?

It sure is!

With NodeBeat as our guinea pig, Seth and I have been working pretty hard the past weeks to get NodeBeat up and running just in time for BB 10 Jam. Since NodeBeat uses a lot of different OF features, it was a perfect way to test out ofxQNX and the stability of the add-on.

Below is some footage I shot of an early NodeBeat Beta running on the PlayBook. I love that compared to the Android build, this device is giving us much lower input and audio latencies which really enhance the experience.

We have submitted NodeBeat to the BlackBerry AppWorld so hopefully it will be available soon for your listening pleasure!

NodeBeat beta:

Feedback / Todo

Since ofxQNX is now available to everyone on GitHub, I’d love to hear what you think about using openFrameworks for your PlayBook projects. While a lot of basic OF functionality is already available in ofxQNX, the things that are still lacking are:

  • ofSoundPlayer, used for controlling the audio levels from the app and play wav/mp3 audio files. For now I recommend using SDL for this purpose.
  • Camera support. Unfortunately the current PlayBook SDK doesnt allow access to the cameras. As soon as those are supported (prob with the next release) I’ll be porting the cameraExample and openCVExample.
  • GPS Support with gpsExample

Probably the most important one to focus on is ofSoundPlayer. As there is already an OpenAL implementation (ofOpenALSoundPlayer) in the repository, I am currently investigating if we will be able to (re)use it for ofxQNX.

Anyway, let me know how ofxQNX runs and don’t hesitate to report bugs or submit patches (on GitHub). Enjoy!

[update 05/05/2012]
ofxQNX now also supports the BlackBerry 10 Beta platform!

[update 14/09/2012]
Updated link to the ofxQNX project, now compatible with OF0071

PlayBook add-on (ofxQNX)
Older post

Rewriting and porting fIRC

Newer post

NodeBeat featured on the BlackBerry Dev blog

PlayBook add-on (ofxQNX)

7 responses

  1. Good stuff Laurence!!! Looking forward to the camera functions!

    Jon April 27th, 2012
  2. Thanks Jon! Yea, it would be a really nice platform as soon as the cameras are supported. I noticed that BlackBerry pushed their openCV port onto github already: :).

    Laurence Muller April 27th, 2012
  3. Looks really great. Unfortunately none of the font examples seem to work when I run in the sim (bb10) or on a device (PlayBook). Getting invalid filename and “font not allocated” error messages. Everything builds fine though. Any ideas?

    jamie – May 8th, 2012
  4. Hi Jamie, thanks for your kind feedback :)! I just committed an update to GitHub. Seems like I forgot to change the examples after modifying the rootpath for assets. It should work alright now for both platforms (it actually affected qnxFontsExample, qnxImageLoaderExample and qnxSoundPlayerExample)

    Laurence Muller May 8th, 2012
  5. Awesome! I noticed last night after another go that the other examples that had assets were also not working. Was going to look at it again this morning, but decided to check here first. Thanks Laurence. This is really great stuff - looking forward to using it.

    jamie – May 8th, 2012
  6. Loving your work so far! Really a lifesaver! Just wanted to know how to set the application resolution. I’m writing a game and don’t want to draw to native resolution due to performance constraints. Thanks heaps!

    Nikhil S June 25th, 2012
  7. I Laurence, I am not experimented in eclipse and c++ either. Also, I am writing an opengl game and i want to use some GLU functions. I have seen that you use it in your project. Can you tell me how to do this. What i have did previously, but nothing work: -add “ofxQNX-develop/libs/glu” folder to my project, - right click in “my project”->configure ->add library-> external library-> load libBB10/x86 libGLU.a for simulator and libBB10/AMRv7 for real device than modify the .pro file as explained in the guide. Then try to compile but this failled with an undefined reference error for any call of glu function. Already, thank for your attention and help.

    Monero Jeanniton – February 1st, 2013