NodeBeat: A BlackBerry Open Source Success Story

Case Studies & Success Stories

Guest post from Roberto S. – Ed.

TITLE_IMAGE

Every once in a while, a feel good story comes around that rallies the troops in the BlackBerry® Developer Relations team. Such was the case with this story. It all started with a developer named Laurence Muller taking advantage of the RIM® offer to submit his Android™ app (fIRC) to the BlackBerry App World™ storefront to qualify for a free BlackBerry® PlayBook™tablet. After Laurence received his BlackBerry PlayBook tablet, he instantly recognized how powerful the device was – especially the BlackBerry® Tablet OS built on QNX – and thought that it might be possible to port the NodeBeat application to BlackBerry PlayBook tablet as a native app.

Laurence had worked on porting the NodeBeat application to the Android platform in collaboration with Affinity Blue (owned by Seth Sandler). NodeBeat is built using an open source application framework called openFrameworks. Therefore, the first task at hand was porting the framework. Laurence started reading the NDK documentation and began the process of porting the API under the ofxQNX repository he setup on GitHub. One by one, each API set and sample was ported and running.

Laurence eventually hit a roadblock with audio. He built a native app to test some audio code but it wasn’t running properly. He finally decided to post a question to the BlackBerry Developer Support Forum to explain his project and ask for help. I was assigned this question to answer. I reviewed the question and sample code provided, checked the blogs that Laurence previously posted (Laurence’s blog is available at http://www.multigesture.net/) and, after checking the NDK documentation myself, ascertained that Laurence was running into a buffer underflow issue and that his current test approach was not running consistently enough without a separate thread.

I answered the post and provided some suggestions to try to correct the problem. Laurence tried the suggestions and it did get better, but not quite good enough. After someone else on my team suggested that OpenAL might help and I passed that suggestion on to Laurence, further investigation by Laurence’s partner Seth Sandler led to switching over to SDL for injecting the audio — and suddenly the audio was performing much better. At this point, the ofxQNX port was complete, and Laurence contributed it to the BlackBerry GitHub repo. To see some of the samples in action, check out the video below:

[ YouTube link for mobile viewing ]

The next task was porting the NodeBeat app, which took just a few days once RIM supplied another BlackBerry PlayBook tablet to Seth. Laurence and Seth were pleased that the native BlackBerry PlayBook tablet port easily outperformed their Android port. This was primarily due to the low input and audio latency for the native implementation (whereas the Android build runs slower since native code is running in a different layer and communication between GUI and the native thread is slow over JNI) and its performance was on par with their iOS version. NodeBeat was quickly submitted to BlackBerry App World for approval.

[ YouTube link for mobile viewing ]

What’s in the cards for NodeBeat? Well, Laurence has already started porting it to BlackBerry® 10 using the simulator, and they’re looking forward to getting their hands on a BlackBerry 10 Dev Alpha testing device. In the meantime, if you like composing music and want to try a new app for doing so, give their app a whirl.

What makes this story so special is this project was not sponsored by RIM. It was totally driven by developers in the open source community and it was almost completed without any help from RIM. This clearly demonstrates that RIM’s open source strategy is working, facilitating the port of apps from other platforms to BlackBerry PlayBook tablet and BlackBerry 10. Our developer community is engaged, resulting in even more improvements to the platform for all developers. We strongly encourage our developer community to follow their desires and port what they need to the platform. However, know that we’re here and ready to help if you run into any issues. In the end, by working together, the platform will get even better and everyone wins.

If you are working on an open source project for the BlackBerry platform utilizing the NDK, let us know. We’ll be glad to write a blog post about it.

For more information about OpenFrameworks, Laurence’s port, and Laurence himself, check out the links below:

About Alex Kinsella

Promoter of apps. Connoisseur of tacos. By day, I'm a PR and Social Media Manager at BlackBerry.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus