Channels ▼


Smartphone Operating Systems: A Developer's Perspective

The RIM BlackBerry Smartphone Platform

If there is one smartphone widely recognized for its enterprise support and communication capabilities, it's Research In Motion's (RIM) BlackBerry smartphones. BlackBerry smartphones feature a useable — if cramped — QWERTY-style keypad that owners can easily write e-mails, rather than going through all of the contortions of entering leetspeak on a numeric keypad. Combined with wireless support and a server infrastructure that pushes Microsoft Exchange e-mails to the device, BlackBerry smartphones enable on-the-go workers to keep in touch from anywhere.

The Canadian company introduced its first device, a wireless two-way pager, in 1999. In 2002, it launched its first BlackBerry smartphone. RIM, as a smartphone steward, has mounted a rapid response to the iPhone threat: it launched the Storm, a full touch screen version of its platform, in Q4 of 2008. In addition, the company offers a range of BlackBerry smartphones with different feature sets, knowing that one size does not fit all. Some of the BlackBerry platform's features are:

  • Multitasking BlackBerry Device Software executes multiple applications simultaneously
  • Java ME underpinnings provide memory protection and trusted code execution
  • Can execute Java ME applications
  • Touch interface support
  • Manages multiple e-mail Exchange e-mail accounts, along with support for POP3 and SMTP, and e-mails can have file attachments
  • Browser supports various media types, and can download files
  • Has enterprise features such as push e-mail; synchronization with Microsoft Exchange
  • For security the platform is FIPS 140-2 compliant, and supports AES or Triple DES encryption sessions via BlackBerry Enterprise Servers
  • Has development tools for writing Java ME applications for BlackBerry smartphones

Like Nokia and Apple, RIM owns and builds the entire hardware and software stack for the BlackBerry smartphone, which gives them the ability to tightly integrate software features to hardware functions. Interestingly, at its core the BlackBerry smartphone is Java ME device, and can execute Java ME MIDlets. However, RIM's BlackBerry Device Software has enhanced the capabilities of the platform with its own Java virtual machine (JVM), along with new Java classes that offer multitasking capabilities and UI enhancements to go beyond the capabilities of Java ME.

Let's take a look at the software stack (Figure 2) to see how RIM accomplished this.

[Click image to view at full size]
Figure 2: BlackBerry software stack

The topmost Application layer is where Java ME applications (MIDlets) and BlackBerry UI applications execute. You can also take existing Java ME code and add specific BlackBerry classes to make a hybrid Java ME application. For example, you might invoke a BlackBerry API call to select an audio output device (speakers or headphones), then use a standard multimedia player class to play the audio content. Hybrid applications are possible as long as you don't intermix MIDP 2.0 and BlackBerry API calls that perform either screen drawing or application management.

Drilling down, the next stack layer is the Java Classes and Frameworks layer. The programmer who has written many a Java ME MIDlet will be on familiar ground here, as this layer resembles the Java ME platform. There's the usual MIDP MIDlet classes that manage the UI and application life cycle, and beneath that resides the CLDC classes that provide access to low-level resources. For BlackBerry smartphones running BlackBerry Device Software 4.0 or later, the platform's Java profile/configuration is MIDP 2.0/CLDC 1.1 compliant, otherwise it uses MIDP 1.0/CLDC 1.0. This layer also implements useful Java Specification Request (JSR) API packages, such as JSR-75 (PIM and FileConnection services), JSR-135 (multimedia capture and playback), JSR-82 (Bluetooth support), JSR-120 (wireless messaging), and JSR-179 (location services), to name a few. All of these classes and those of the application are loaded and executed by the BlackBerry JVM.

The BlackBerry API extensions in this layer enhance the platform in several ways. First, they provide UI APIs for custom menu, widget, and screens. Next, an application class, Application, enables an application to persist and continue to run in the background, unlike the MIDP Midlet class which requires that the application terminate when it is closed. Other APIs handle the set-up and tear-down of network sessions, and manage I/O to servers. Finally, these APIs provide hooks into the device's camera, media player, and Web browser. An application can be written using only CLDC and BlackBerry APIs. Such an application has access to all of the device's features including, for example, Bluetooth, the accelerometer, and the touch screen on the Storm. It can also run concurrently with other applications. Finally, the application can be launched when the BlackBerry starts up and then run in the background. The catch to writing an application that uses BlackBerry API extensions is that it ties the application this smartphone. However, this is no worse than using the unique Java classes found in Google's Android.

The BlackBerry Device Software layer implements a low-level multitasking, multithreaded operating system. It uses listener threads to monitor for specific device events. For example, these listener threads manage push support for e-mail and messages. The BlackBerry Device Software allows an IT manager to configure applications and disable certain smartphone features, and to blank a lost device remotely.

Software Tools for the BlackBerry Platform

With the BlackBerry platform being a Java ME platform, you can use a number of Java development tools, such as Eclipse and NetBeans to write applications for BlackBerry smartphones.

RIM also provides a BlackBerry Java Development Environment (JDE), which is a set of standalone tools. The JDE consists of an IDE that allows you to write, build and test Java Mobile and BlackBerry smartphone applications at the source code level. The JDE has phone simulators that allow you to view and interact with the program. It also has a Signing Authority Tool, which you use to sign the application. Note that for your application to access the BlackBerry APIs, the code must be signed. Simulator software for e-mail and communications with BlackBerry Enterprise Servers is available for thoroughly checking out a networked application.

For specialized client/server applications, RIM provides RAD tools that can quickly build BlackBerry smartphone client applications. These tools can prototype services for a UI framework, data management, and client-server I/O. The RAD tools are available as a plug-in for Microsoft Visual Studio, or as a stand-alone Mobile Development System (MDS) used inside of Eclipse.

For Web development, you can use standards-based HTML, Javascript, and CSS. The BlackBerry web browser is standards compliant, and on BlackBerry Device Software 4.6 or later, the browser adheres to AJAX, JavaScript 1.5, CSS 2.1, DOM L2, and HTM4.01 standards. The platform also supports a messaging arrangement termed "Web Signals". When an update is made to a web site, its server can use RIM's push infrastructure to send a notification to a BlackBerry device. The pushed message includes a hyperlink back to the updated content.

Applications can be distributed over the air (OTA), or through a web loader application on a PC, with a BlackBerry smartphone tethered to the computer with a USB cable. RIM has been distributing applications through Handango. However, in March the company plans to launch an app store to distribute applications. Developers will retain eighty percent of the revenue made from sales of the application.

BlackBerry Summary


  • Best of breed Java ME platform for enterprise communications.
  • Infrastructure for push e-mail and messaging in place and proven.
  • Platform supports multiple third-party applications running, if they use BlackBerry API classes.


  • To use the platform to its best advantage, must use RIM's own APIs and classes.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.