Building and Deploying Samples for AIR

The Samples-for-AIR project is publicly available online at github and can be downloaded using  git version control.

Using git, perform the following in a command prompt:

git clone

The above command will copy Samples-for-Air source to Samples-for-AIR directory.

GitHub also provides git-less access to a repo’s sources via a zip-ball.  In this case, point your browser or curl to and unzip.

Importing project into Flash Builder 4.5

Adobe Flash Builder 4.5 and Blackberry Tablet OS SDK for Adobe AIR are both required to build the Samples for AIR project. See

Once you’ve checked out the Samples-for-Air project, launch Flash Builder 4.5 and click File\Import\Flash Builder\Flash Builder Project

Select Project Folder Samples-For-Air\SampleLibrary and click Finish.

Repeat the above steps and import Samples-For-Air\SampleApplication and click Finish.

You should now have two projects SampleAirApplication and SampleAirLibrary. You’re now ready to begin exploring the sample application and library.

When creating this project Adobe AIR SDK version 3.1 was used with the BlackBerry tablet OS SDK. Therefore, if you’re using a different Adobe AIR SDK version, SampleAirApplication/src/SampleApplication-app.xml may require a change.  If you experience the following error:  Namespace x.x.x in the application descriptor file should be equal or higher than the minimum version x.x.x required by Flex SDK

The above example shows changing the xmlns version to 3.1 in the line

<application xmlns=”″&gt;

in SampleAirApplication/src/SampleApplication-app.xml to match the version of the Adobe AIR SDK version 3.1 installed.

Deploying Sample AIR project to the BlackBerry Playbook

NOTE, some included APIs will not execute within Desktop Application Flash builder debug profiles.

Select SampleAirApplication and choose Run As Mobile Application (or Debug As)

Set the following properties in the Debug Configurations window:

  • Project: SampleAirApplication
  • Application File: src/SampleApplication
  • Target Platform: BlackBerry Tablet OS
  • Launch Method: On device

NOTE: When configuring BlackBerry Tablet test device profile USB is preferred as WiFi reception can cause the connection to fail, depending on your WiFi signal strength. The USB port starts with 169.254.*.* If you are using Tablet OS version 1.0.7 and above the IP address will be and set the debug host to

Edit BlackBerry Tablet OS Test Device. These settings must match those in the Playbook OptionsSecurityDevelopment Mode see Enabling debug mode on the BlackBerry Playbook.

Enabling debug mode on the BlackBerry Playbook

Enable development mode on your BlackBerry Playbook by visiting Playbook Options\Security\Development Mode and set Use development mode set to on.

Need help installing a Debug Token in your Playbook?

Customizing the Sample Library package path and directory structure

Open Samples-for-AIR\SampleLibrary\build.xml with your favourite editor and locate the line:

<property name=”generated.package.root” value=”com.playbook.samples”/>

To change the package path of the sample library change value=”com.playbook.samples” to your preferred package path. e .g.

<property name=”generated.package.root” value=”“/>

Then, from a command prompt, execute ant in Samples-for-AIR\SampleLibrary

$ ant

Buildfile: c:\temp\Samples-for-AIR\SampleLibrary\build.xml

[echo] Generated source will copied to: generated/net/foo
[echo] Target package:*
[echo] Generated source copied to: generated/net/foo

Total time: 1 second

The newly generated source files will be found in Samples-for-AIR\SampleLibrary\generated

After running the above example, the package path in each source file starts with e.g Samples-for-AIR\SampleLibrary\generated\net\foo\ui\menu\ contains package


See related post Samples for AIR: An open source project for the BlackBerry Playbook.


This entry was posted in AIR, PlayBook and tagged , , . Bookmark the permalink.

14 Responses to Building and Deploying Samples for AIR

  1. Pingback: Samples for AIR: An open source project for the BlackBerry Playbook

  2. Raul Jimenez says:

    Hi Eduardo,

    I’m having a few problems with some classes:

    – TextInputIMF was not found.
    – Undefined method “getMaxOutputLevel” at qnx.system.AudioManager.
    – Undefined property “A2DP” at AudioOutput.
    – Undefined property “HDMI” at AudioOutput.

    I guess that I’m not importing the correct SWC files but I’m working with SDK 1.1.1.


    • almcintosh says:

      Raul, Try pulling in the latest changes. These issues should have been resolved in the latest code base.

      • Raul Jimenez says:

        Hi Allan,

        The pull solved the problems and now I can compile but when I run the application I see this error:

        VerifyError: Error #1014: Class qnx.pps::PPSChannel could not be found.

        at SampleApplication()[C:\Users\HAL9000\Adobe Flash Builder 4.5.1\git\SamplesForAIR\SampleApplication\src\]

        Im compiling with Flash Builder 4.5.1, AIR 2.7 and PlayBook SDK 1.1.1.

        It’s weird because i have been searched for “PPSChannel” in my entire workspace and I haven’t found anything, ¿any ideas?


  3. almcintosh says:

    Please refer to the above section “Deploying Sample AIR project to the BlackBerry Playbook” and follow the steps described there. I suspect you selected “Launch Method: On desktop”, but the instructions recommend using “Launch Method: On playbook”. Good luck!

  4. Raul Jimenez says:


    Sorry! It’s now working!! Thanks!!

    I loved the MediaPlayBar, really nice 🙂

    It’s all working perfect, audio playback, download manager, marquee and the top menu, very nice work.

    I will tell you if I use those components on a project 😉


  5. hajimemashoo says:

    Hi, I have folloed the steps to import the projects into Flash Builder 4.6 with the BB sdk plugin installed.

    In FB 4.6, I get a bunch of errors (total 89 errors) which consists of the likes:
    1017: The definition of base class BackButton was not found. /SampleAirLibrary/src/samples/ui/buttons line 29 Flex Problem

    1020: Method marked override must override another method. /SampleAirLibrary/src/samples/ui/buttons line 40 Flex Problem

    unable to open ‘/Users/alexfoo/Desktop/Adobe Air/Samples/Samples-for-AIR/SampleLibrary/bin/SampleAirLibrary.swc’ SampleAirApplication Unknown Flex Problem

    It seems FB can’t find the qnx package?

  6. darkdaven says:

    Description Resource Path Location Type
    unable to open ‘C:\Program Files\Research In Motion\blackberry-tablet-sdk-2.0.0\frameworks\libs\qnx-screen’ SampleAirApplication Unknown Flex Problem

    • pelegri says:

      Did you try Matt’s suggestion of updating the library paths?

      Also, we are working on an update to the samples for the PlayBook 2.

      • darkdaven says:

        in the first place i have 83 errors, but doing matt’s suggestion a reduce it to one, the one i post.

  7. Ollivera says:

    I also got 89 errors when loading the project.
    I am not familiar with Flash Builder. How can I include the QNX components in the library path?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s