Labs of Patrick Heinzelmann

BlackBerry provides for the PlayBook development a AIR SDK, which contains all the tools and ActionScript3 libraries
needed for the development.

The ActionScript3 libraries contains APIs for PlayBook/QNX specific OS features like the AudioManager. Most of the
features are based on the QNX Messaging System PPS (QNX Persistent Publish/Subscribe)

Because QNX PPS is only available on the device or the simulator (VMWare Image), ADL will throw an errors when an
application is using these features. The error message (VerifyError: Error #1014: Class qnx.pps::PPSChannel could not be found.)
tells that compiler can’t find the PPS specific class qnx.pps.PPS or qnx.pps.PPSChannel.

This little project provides a workaround and solution, that let you develop with ADL using same of QNX classes. It also allows to
test device specific stuff, which isn't implemented by the VMWare simulator. For example: Power Management.

PlayBook Device Simulation (ActionScript Library)

The ActionScript Library is port of the PlayBook/QNX Librar and extends the Flash Mobile Device Simulation. The classes of the
PlayBook Device Simulation have the same features as the original library.

All class paths are prefixed with de.patrickheinzelmann.*. For example: QNX AudioManager can found
below de.patrickheinzelmann.qnx.system.AudioManager.

Following classes and their function are supported:

  • qnx.system.AudioManager
  • qnx.system.Device
  • qnx.system.QNXApplication
  • qnx.system.QNXSystem

and FlashMobileDeviceSimulation supports:

  • flash.sensors.Accelerometer
  • flash.sensors.Geolocation





PlayBook Device Simulator (AIR Application)

The PlayBook Device Simulator let you simulate device specific features, which you can control by VMware Simulator.

It is designed for the development with ADL (AIR Debug Launcher) and communicates with the Mobile Application using
the build-in SocketServer.

With the PlayBook Device Simulator, the developer can control all classes of the PlayBook Device Simulation Library.

Integration and Usage

The PlayBook Device Simulation is now based on the Flash Mobile Device Simulation to provide also the standard Flash Platform Device
Features and Functions inside the PlayBook Device Simulator. You have to download both libraries to use the PlayBook Device Simulation.

I'm using Conditional Compilation for the integration, because it allows me to use both (QNX and the PlayBook Device
Simulation) libraries in the same project. Conditional Compilation is replacing ActionScript code based the configuration
variables, which you pass as arguments to the compiler.

If you have no idea how Conditional Compilation works, you can found information in the LiveDocs of Flex or take a look
on the sample applications below.

To use the PlayBook Device Simulation simply start the PlayBook Device Simulator (AIR application) and when
application is running start your own mobile application. Pretty simple and easy!

PS: This solution won't throw an error, when starting your mobile application and the PlayBook Device Simulator
isn't running. ;)

Sample Applications and Demos

You can download the samples as Flash Builder Project from this website or grab the source code of the samples from
my GitHub account.

Sample Applications for the Flash Mobile Device Simualtion can be found here.


ActionScript Library (0.0.3) and AIR Appliation (0.0.3) are implementing the lastest build of the BlackBerry PlayBook SD
(1.0.1) and are based on the ActionScript Docs of BlackBerry PlayBook SDK 1.0.0, which is online available o the
BlackBerry Developer Website.

Legal Note

BlackBerry and PlayBook are trademarks of Research In Motion Limited.