blackberry tablet os sdk for adobe air-getting started guide for windows...

Upload: qathrunnada-salsabila

Post on 08-Apr-2018

221 views

Category:

Documents


2 download

TRANSCRIPT

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    1/45

    BlackBerry Tablet OS SDK for

    Adobe AIRVersion: 0.9.3 Beta

    Getting Started Guide for Windows Developers

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    2/45

    Published: 2011-02-08SWD-1441836-0303052110-001

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    3/45

    Contents1 Overview........................................................................................................................................................... 2

    2 Approaches to application development for Adobe AIR.................................................................................. 3

    3 System requirements........................................................................................................................................ 4

    4 Installing the BlackBerry Tablet OS SDK for Adobe AIR.................................................................................... 5

    Install and integrate the BlackBerry Tablet OS SDK for Adobe AIR with Flash Builder..................................... 5

    Install the BlackBerry Tablet OS SDK for Adobe AIR without Flash Builder integration................................... 6

    5 Installing and configuring the BlackBerry Tablet Simulator.............................................................................. 7

    Configure a virtual machine for the BlackBerry Tablet Simulator.................................................................... 7

    Enable development mode............................................................................................................................... 11

    Retrieving the IP address of the BlackBerry Tablet Simulator.......................................................................... 12

    6 Creating your first application.......................................................................................................................... 13

    Create an ActionScript Mobile AIR project in Adobe Flash Builder 4.5............................................................ 13Create an ActionScript project in Adobe Flash Builder 4.0............................................................................... 15

    7 Adding an icon for your application.................................................................................................................. 19

    Add an icon for your ActionScript project........................................................................................................ 19

    Create an XML configuration file for your icon................................................................................................. 20

    8 Testing and debugging an application in the BlackBerry Tablet Simulator...................................................... 22

    Testing your application using Adobe Flash Builder......................................................................................... 22

    Testing your application using Adobe Flash Builder 4.5............................................................................ 22

    Testing your application using Adobe Flash Builder 4.0............................................................................ 28

    Testing your application using the command line............................................................................................ 34

    Package and deploy your application using the command line................................................................ 34

    Remove your application from the BlackBerry Tablet Simulator using the command line....................... 35

    9 BlackBerry Tablet Simulator gestures............................................................................................................... 36

    10 Glossary............................................................................................................................................................ 37

    11 Provide feedback.............................................................................................................................................. 38

    12 Document revision history................................................................................................................................ 39

    13 Legal notice....................................................................................................................................................... 41

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    4/45

    Overview 1You can use the BlackBerry Tablet OS SDK for Adobe AIR to create applications for the BlackBerry PlayBook

    tablet. The SDK allows you to create applications that leverage the power of Adobe ActionScript and Adobe Flex

    to achieve portability across multiple devices.

    The BlackBerry Tablet OS SDK for Adobe AIR allows you to optimize your AIR applications for the BlackBerry Tablet

    OS. This SDK provides APIs that extend ActionScript 3.0 so that you can develop applications that have the look and

    feel of native BlackBerry PlayBook tablet applications. These APIs provide some unique UI components and

    predefined skins, as well as listeners for events specific to the BlackBerry Tablet OS, such as a swipe-down event from

    the top bezel (the touch-sensitive frame around the display area of the screen). Adobe Flash based applications

    can also access some of the functionality that is unique to mobile devices, such as access to accelerometer andgeolocation information, and support for touch and gesture events.

    The BlackBerry PlayBook tablet includes the Adobe AIR runtime environment. A BlackBerry Tablet Simulator is

    available as a separate download so that you can test the appearance and functionality of your applications.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    2

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    5/45

    Approaches to application development for

    Adobe AIR

    2

    Development approach Description

    Adobe Flash Builder Flash Builder is an Eclipse based IDE that provides integrated support for developing

    RIAs that run outside the browser in the AIR runtime environment.

    The BlackBerry Tablet OS SDK for Adobe AIR includes a plug-in for Flash Builder.

    The plug-in allows you to create Adobe ActionScript projects intended to run in

    the AIR runtime environment on the BlackBerry PlayBook tablet.

    Adobe Flex Flex is a free, open-source development framework that you can use to build and

    deploy applications for the AIR runtime environment when you work in a

    development environment other than Flash Builder or with a text editor.

    You can create applications by using the Flex SDK to compile your ActionScript code

    into SWF format. You can then use the command line tools in the BlackBerry Tablet

    OS SDK to package and deploy your application.

    Find out more

    For more information about developing applications for the BlackBerry PlayBook tablet, visit http://

    us.blackberry.com/developers/tablet/adobe.jsp.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    3

    http://us.blackberry.com/developers/tablet/adobe.jsphttp://us.blackberry.com/developers/tablet/adobe.jsp
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    6/45

    System requirements 3

    Item Requirement

    Runtime environment Java Runtime Environment 1.6

    Adobe AIR SDK 2.5

    Simulator BlackBerry Tablet Simulator

    Virtual environment VMware Player to run the BlackBerry Tablet Simulator

    Development environment BlackBerry Tablet OS SDK for Adobe AIR

    Adobe Flash Builder 4.5 Burrito, 4.0.1, or Adobe Flex Hero

    Note: Flash Builder 4.5 includes the Adobe AIR SDK 2.5 and Flex Hero

    Processor Intel Pentium 4 or AMD Athlon desktop processor 2 GHz or faster

    Storage space 1 GB available hard disk space or more

    Memory 2 GB RAM or more

    Monitor Resolution of 1024 x 768 or higher

    Operating system Windows Vista Ultimate or Enterprise, Windows XP SP3, or Windows 7

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    4

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    7/45

    Installing the BlackBerry Tablet OS SDK for

    Adobe AIR

    4

    Install and integrate the BlackBerry Tablet OS SDK forAdobe AIR with Flash BuilderIf you do not use Adobe Flash Builder, to install the BlackBerry Tablet OS SDK for Adobe AIR for a different

    development environment, see Install the BlackBerry Tablet OS SDK for Adobe AIR without Flash Builder integration.

    Before you begin:

    You must already have Adobe Flash Builder installed. Download the BlackBerry Tablet OS SDK for Adobe AIR from

    http://us.blackberry.com/developers/tablet/adobe.jsp. If you are using Flash Builder 4.0.1, download and install the

    Adobe AIR SDK 2.5 (included with Flash Builder 4.5) from www.adobe.com/products/air/sdk/.

    1. Log in with system administrator privileges.

    2. In the folder where you downloaded the BlackBerry Tablet OS SDK for Adobe AIR, double-click the

    BlackBerryTabletSDK-Air-Installer--Win.exe file.3. On the Introduction screen, click Next.

    4. On the License Agreement screen, accept or decline the terms of the license agreement.

    5. Click Next.

    6. On the Integration with Adobe Flash Builder screen, select the Yes option.

    7. Click Next.

    8. On the Choose Install Folder screen, provide the location of the folder where you installed Flash Builder.

    The default installation locations are:

    Version number Default location

    Adobe Flash Builder 4.5 /Program Files/Adobe/Adobe Flash Builder Burrito

    Adobe Flash Builder 4.0.1 /Program Files/Adobe/Adobe Flash Builder 4

    9. Click Next.

    10. On the Choose Adobe AIR SDK Install Folder screen, choose one of the following locations:

    Version number Default location

    Adobe Flash Builder 4.5 The folder named sdks/4.5.0 inside the folder where

    you installed Flash Builder

    Adobe Flash Builder 4.0.1 The folder where you extracted the Adobe AIR SDK 2.5

    11. Click Next.

    12. On the Pre-Installation Summary screen, verify your installation settings. Click Install.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    5

    http://us.blackberry.com/developers/tablet/adobe.jsphttp://us.blackberry.com/developers/tablet/adobe.jsphttp://us.blackberry.com/developers/tablet/adobe.jsphttp://www.adobe.com/products/air/sdk/http://us.blackberry.com/developers/tablet/adobe.jsp
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    8/45

    13. Click Done.

    14. If you installed Flash Builder 4.5 on a computer running Windows 7, to complete the integration, perform the

    following steps once:a. Right-click the Adobe Flash Builder Burrito shortcut.

    b. Choose Run as Administrator.

    Install the BlackBerry Tablet OS SDK for Adobe AIR withoutFlash Builder integration

    To install the BlackBerry Tablet OS SDK for Adobe AIR in the Adobe Flash Builder environment, see Install and

    integrate the BlackBerry Tablet OS SDK for Adobe AIR with Flash Builder .

    Before you begin:

    Download and install the following software:

    Adobe AIR SDK 2.5 (www.adobe.com/go/getairsdk)

    Adobe Flex Hero( http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero)

    BlackBerry Tablet OS SDK for Adobe AIR (http://us.blackberry.com/developers/tablet/adobe.jsp)

    1. In the folder where you downloaded the BlackBerry Tablet OS SDK for Adobe AIR, double-click the

    BlackBerryTabletSDK-Air-Installer--Win.exe file.

    2. On the Introduction screen, click Next.

    3. On the License Agreement screen, accept or decline the terms of the license agreement.

    4. Click Next.

    5. On the Integration with Adobe Flash Builder screen, select the No option.

    6. Click Next.

    7. On the Choose Install Folder screen, provide the location of the folder where you want to install the BlackBerry

    Tablet OS SDK.

    8. Click Next.

    9. On the Choose Adobe AIR SDK Install Folder screen, provide the location of the folder where you extracted the

    Adobe AIR SDK 2.5.

    10. Click Next.

    11. On the Pre-Installation Summary screen, verify your installation settings. Click Install.

    12. Click Done.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    6

    http://us.blackberry.com/developers/tablet/adobe.jsp
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    9/45

    Installing and configuring the BlackBerry

    Tablet Simulator

    5

    Configure a virtual machine for the BlackBerry TabletSimulatorBefore you begin: Download the BlackBerry Tablet Simulator setup application from http://us.blackberry.com/

    developers/tablet/adobe.jsp and extract the ISO image file . You must also download and install the VMware Player

    from www.vmware.com/download/player.

    1. In VMware Player, click Create a New Virtual Machine.

    2. On the Welcome to the New Virtual Machine Wizard screen, select the Installer disc image file (iso) option.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    7

    http://www.vmware.com/download/playerhttp://us.blackberry.com/developers/tablet/adobe.jsphttp://us.blackberry.com/developers/tablet/adobe.jsp
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    10/45

    3. Click Browse.

    4. Select the BlackBerryPlayBookSimulator.iso file from the location where you extracted it.

    5. Click Open.

    6. Click Next.7. On the Select a Guest Operating System screen:

    a. In the Guest operating system section, select Other.

    b. In the Version section, select Other.

    c. Click Next.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    8

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    11/45

    8. In the Virtual machine name field, type a name for the simulator.

    9. Click Next.

    10. Click Next.

    11. Click Customize Hardware.12. In the Memory section, in the Memory for this virtual machine field, type 1024.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    9

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    12/45

    13. Select Display from the device list.

    14. In the 3D graphics section, select the Accelerate 3D graphics check box.

    15. Click OK.

    16. Click Finish.

    17. When your virtual machine starts for the first time, you are prompted to overwrite /dev/hd0 with the QNX

    demonstration. Type Y, then press ENTER.

    18. After the simulator boots, click I have finished installing.

    After you finish: To load applications on the simulator, you must enable development mode and retrieve the IP

    address of the simulator. For more information about enabling development mode, see "Enable development

    mode". For more information about retrieving the IP address, see "Retrieving the IP address of the simulator".

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    10

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    13/45

    Enable development mode

    You must enable development mode before you can load and run your application on the BlackBerry TabletSimulator. You must also enable development mode if you want to view the IP address of the simulator.

    1. In the virtual machine for the BlackBerry Tablet Simulator, in the upper-right corner of the simulator screen,

    click the gear icon.

    2. In the list of settings, click Security.

    3. Beside the Device password label, click the Change button.

    4. Specify a password for the simulator.

    5. Beside the Development mode is offlabel, click the Enable button.

    6. In the Password field, type your device password.

    7. Click OK.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    11

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    14/45

    Retrieving the IP address of the BlackBerry Tablet Simulator

    Each time the BlackBerry Tablet Simulator starts, VMware Player assigns it an IP address. You must provide thisaddress to the deployment tool of your choice to load your application on to the simulator. To display the IP address,

    the simulator must be in development mode. For more information about development mode, see "Enable

    development mode".

    After you enable development mode, click the image of the hammer to the right of the clock on the status bar

    ( ) to display the simulator's IP address.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    12

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    15/45

    Creating your first application 6You can create a BlackBerry Tablet OS application using Adobe ActionScript. You can use the sample code in

    "Create an ActionScript project" in any development environment. Similarly, you can use the sample XML markup

    in "Create an XML configuration file for your icon". For more information about deploying an application created

    using a different development environment, see "Testing your application from the command line".

    Create an ActionScript Mobile AIR project in Adobe FlashBuilder 4.5

    The following steps describe how to create an Adobe ActionScript project named AIRHelloWorld in Adobe Flash

    Builder 4.5. If you are using Adobe Flash Builder 4.0, see "Create an ActionScript project in AdobeFlash Builder 4.0".

    Before you begin:

    Create an image in PNG format with a maximum resolution of 86 x 86 pixels to be used as the icon for your application.

    Name the image blackberry-tablet-icon.png. If you place the image file in the same folder as your compiled

    application, the application packaging tool that is included in the BlackBerry Tablet OS SDK adds this image to your

    application automatically. For more information about adding an icon to your application, see "Add an icon for your

    ActionScript project" and "Create an XML configuration file for your icon".

    1. In Flash Builder, on the File menu, click New > Actionscript Mobile Project.

    2. In the Project name field, type AIRHelloWorld.

    3. In the Flex SDK version section, select the Use default SDK option.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    13

    http://-/?-
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    16/45

    4. Click Next.

    5. In the Target platforms section, clear the Google Android check box.

    6. Click Finish.

    7. In the code editor pane, replace the default code for AIRHelloWorld.as by copying and pasting pasting the

    following code sample.

    package{

    import flash.display.Sprite;import flash.events.MouseEvent;import flash.text.TextField;import flash.text.TextFormat;import qnx.ui.buttons.Button;import qnx.ui.buttons.LabelButton;

    // The following metadata specifies the size and properties of the canvas that// this application should occupy on the BlackBerry PlayBook screen.[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]

    public class AIRHelloWorld extends Sprite{public function AIRHelloWorld(){

    var helloButton:LabelButton = new LabelButton();helloButton.label = "Hello World!";helloButton.x = (stage.stageWidth - helloButton.width)/2;helloButton.y = (stage.stageHeight - helloButton.height)/2;

    var myFormat:TextFormat = new TextFormat();

    myFormat.color = 0xAA0000;myFormat.size = 24;myFormat.italic = true;

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    14

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    17/45

    myFormat.align = "center";var text:TextField = new TextField();text.text = "Close";text.setTextFormat(myFormat);

    var closeButton:Button = new Button();closeButton.addChild(text);closeButton.addEventListener(MouseEvent.CLICK, closeWindow);closeButton.x = (stage.stageWidth - closeButton.width)/2;closeButton.y = helloButton.y - helloButton.height;

    addChild(helloButton);addChild(closeButton);

    stage.nativeWindow.visible = true;}

    private function closeWindow(event:MouseEvent):void{stage.nativeWindow.close();

    } }}

    8. Save your project.

    Create an ActionScript project in Adobe Flash Builder 4.0The following steps describe how to create an Adobe ActionScript project named AIRHelloWorld in Adobe Flash

    Builder 4.0. If you are using Flash Builder 4.5, see "Create an ActionScript Mobile AIR project in Adobe Flash Builder

    4.5".

    Before you begin:

    Create an image in PNG format with a maximum resolution of 86 x 86 pixels to be used as the icon for your application.

    Name the image blackberry-tablet-icon.png. If you place the image file in same folder as your compiled application,

    the application packaging tool that is included in the BlackBerry Tablet OS SDK for Adobe AIR adds this image to

    your application automatically. For more information about adding an icon to your application, see "Add an icon for

    your ActionScript project" and "Create an XML configuration file for your icon".

    1. In Flash Builder, on the File menu, click New > Flex Project.

    2. In the Project name field, type AIRHelloWorld.3. In the Application type section, select the Desktop (runs in Adobe AIR) option.

    4. In the Flex SDK version section, select the BlackBerry Tablet OS SDK for Adobe AIR.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    15

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    18/45

    5. Click Next.

    6. Click Next.

    7. In the Main application file field, type AIRHelloWorld.as.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    16

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    19/45

    8. Click Finish.

    9. In the code editor pane, replace the default code for AIRHelloWorld.as by copying and pasting pasting the

    following code sample.

    package{

    import flash.display.Sprite;import flash.events.MouseEvent;

    import flash.text.TextField;import flash.text.TextFormat;import qnx.ui.buttons.Button;import qnx.ui.buttons.LabelButton;

    // The following metadata specifies the size and properties of the canvas that// this application should occupy on the BlackBerry PlayBook screen.[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]public class AIRHelloWorld extends Sprite{

    public function AIRHelloWorld(){

    var helloButton:LabelButton = new LabelButton();

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    17

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    20/45

    helloButton.label = "Hello World!";helloButton.x = (stage.stageWidth - helloButton.width)/2;helloButton.y = (stage.stageHeight - helloButton.height)/2;

    var myFormat:TextFormat = new TextFormat();myFormat.color = 0xAA0000;myFormat.size = 24;myFormat.italic = true;myFormat.align = "center";var text:TextField = new TextField();text.text = "Close";text.setTextFormat(myFormat);

    var closeButton:Button = new Button();

    closeButton.addChild(text);closeButton.addEventListener(MouseEvent.CLICK, closeWindow);closeButton.x = (stage.stageWidth - closeButton.width)/2;closeButton.y = helloButton.y - helloButton.height;

    addChild(helloButton);addChild(closeButton);

    stage.nativeWindow.visible = true;}

    private function closeWindow(event:MouseEvent):void{stage.nativeWindow.close();

    }}

    }

    10. Save your project.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    18

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    21/45

    Adding an icon for your application 7

    Add an icon for your ActionScript projectYou can add an image to use as the icon for your Adobe ActionScript project using Adobe Flash Builder 4, or by

    using the application packaging tool command line interface. The following steps describe how to add an image in

    Flash Builder 4.

    Before you begin: Create an image in PNG format with a maximum resolution of 86 x 86 pixels.

    1. In Flash Builder, in the Package Explorer pane, in your project tree, right-click the src folder.

    2. Click Import.

    3. Expand General, and select File System.

    4. Click Next.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    19

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    22/45

    5. Next to the From directory field, click Browse.

    6. Navigate to the folder that contains your image.

    7. Click OK.8. Select the check box beside your image.

    9. Click Finish.

    After you finish:

    You must create an XML configuration file to notify the BlackBerry Tablet OS that the image is the icon for your

    application. For more information about creating an XML configuration file, see "Create an XML configuration file

    for your icon".

    Create an XML configuration file for your iconThe following steps describe how to create an XML configuration file in Adobe Flash Builder 4. The configuration

    file instructs the BlackBerry Tablet OS to use an image that you create as the icon for your application.1. In Flash Builder, in the Package explorer pane, select the src folder.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    20

    http://-/?-http://-/?-
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    23/45

    2. On the File menu, click New > File.

    3. In the File name field, type blackberry-tablet.xml.

    4. Click Finish.5. In the Package explorer pane, in your project's src folder, right-click the blackberry-tablet.xml file.

    6. Click Open With > Text Editor.

    7. In the text editor pane for blackberry-tablet.xml, paste the following XML markup. Between the image

    elements, replace your_image.png with the name of your image file.

    nonetrueSample Inc.core.internet

    your_image.png

    8. On the File menu, click Save.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    21

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    24/45

    Testing and debugging an application in theBlackBerry Tablet Simulator

    8

    Testing your application using Adobe Flash BuilderIf you installed the BlackBerry Tablet OS SDK as an Adobe Flash Builder plug-in, you can configure the integrated

    launch tools to package and deploy your application to the BlackBerry Tablet Simulator. Using a Run configuration,

    you can install, uninstall, and run your application in the simulator. Using a Debug configuration, you can install and

    run your application, and receive debug status information from the simulator. For more information about testing

    your application using the command line tools, see "Testing your application using the command line".

    Testing your application using Adobe Flash Builder 4.5

    Debug your application in Adobe Flash Builder 4.5

    To debug your application, you must create a launch configuration in Adobe Flash Builder to package and deploy

    your application to the BlackBerry Tablet Simulator. If you are using Flash Builder 4.0, see "Debug your application

    in Adobe Flash Builder 4.0".

    Before you begin: To deploy applications to the BlackBerry Tablet Simulator, you must enable development mode

    and retrieve the simulator's IP address. For more information about development mode, see "Enable development

    mode". For more information about retrieving the IP address of your simulator, see "Retrieving the IP address of the

    BlackBerry Tablet Simulator".

    1. On the Run menu, click Debug Configurations.

    2. In the list of debug configurations, click Mobile Application.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    22

    RIM C fid ti l d P i t I f ti B t C t O l C t t d ft bj t t h

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    25/45

    3. Click the New button. The button is represented by a white rectangle with a yellow cross, above the list of debug

    configurations.

    4. Beside the Project field, click Browse.

    5. In the list of projects, click your project.

    6. On the Main tab, in the Launch method section, select the On device option.

    7. In the Deployment section, in the Deployment method drop-down list, choose one of the following deployment

    methods:

    To install and debug your application on the simulator, choose Install and Launch.

    To debug your application on the simulator without installing the application, choose Launch.

    Note: You must install your application on the simulator at least once before you use this deployment method.

    8. In the Deployment section, in the Target field, type the IP address of your simulator.

    9. In the Deployment section, in the Device password field, type the simulator password.

    Note: To save your password as part of the launch configuration, click Save device password.

    10. Click Apply.

    11. On the Common tab, in the Display in favorites menu list, select the Debug check box.

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    23

    RIM Confidential and Proprietary Information Beta Customers Only Content and software are subject to change

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    26/45

    12. Click Apply.

    13. Click Debug to launch your application in the BlackBerry Tablet Simulator.

    The main Flash Builder window displays the debug output in the Console pane. You can switch to the Debug

    perspective for a better view of your debug session.

    The following image shows the Hello World application minimized in the simulator:

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    24

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    27/45

    Run your application in Adobe Flash Builder 4.5

    To run your application, you must create a launch configuration in Adobe Flash Builder to package and deploy your

    application to the BlackBerry Tablet Simulator. If you are using Flash Builder 4.0, see "Run your application in AdobeFlash Builder 4.0".

    Before you begin: To deploy applications to the BlackBerry Tablet Simulator, you must enable development mode

    and retrieve the simulator's IP address. For more information about development mode, see "Enable development

    mode". For more information about retrieving the IP address of your simulator, see "Retrieving the IP address of the

    BlackBerry Tablet Simulator".

    1. On the Run menu, click Run Configurations.

    2. In the list of run configurations, click Mobile Application.

    3. Click the New button. The button is represented by a white rectangle with a yellow cross, above the list of run

    configurations.

    RIM Confidential and Proprietary Information Beta Customers Only. Content and software are subject to change.

    25

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    28/45

    4. Beside the Project field, click Browse.

    5. In the list of projects, click your project.

    6. On the Main tab, in the Launch method section, select the On device option.

    7. In the Deployment section, in the Deployment method drop-down list, choose one of the following deployment

    methods:

    Package your application as a .BAR file

    Install your application on the BlackBerry Tablet Simulator

    Launch your application on the BlackBerry Tablet Simulator without installing the aplication

    Note: You must install your application on the simulator at least once before you use this deployment method.

    Install and launch your application

    Uninstall your application

    Terminate your application

    8. In the Deployment section, in the Target field, type the IP address of your simulator.

    9. In the Deployment section, in the Device password field, enter the password of your simulator.

    Note: To save your password as part of the launch configuration, click Save device password.

    10. Click Apply.

    11. On the Common tab, in the Display in favorites menu list, select the Run check box.

    26

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    29/45

    12. Click Apply.13. Click Run to launch your application in the BlackBerry Tablet Simulator.

    The following image shows the Hello World application minimized in the simulator:

    27

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    30/45

    Testing your application using Adobe Flash Builder 4.0

    Debug your application in Adobe Flash Builder 4.0

    To debug your application, you must create a launch configuration in Adobe Flash Builder to package and deploy

    your application to the BlackBerry Tablet Simulator. If you are using Flash Builder 4.5, see " Debug your application

    in Adobe Flash Builder 4.5".

    Before you begin:

    To deploy applications to the BlackBerry Tablet Simulator, you must enable development mode and retrieve the

    simulator's IP address. For more information about development mode, see "Enable development mode". For more

    information about retrieving the IP address of your simulator, see "Retrieving the IP address of the BlackBerry TabletSimulator".

    1. On the Run menu, select Debug > Other.

    2. In the list of debug configurations, select BlackBerry Tablet OS AIR Application.

    3. Click the New button. The button is represented by a white rectangle with a yellow cross, above the list of debug

    configurations.

    4. Next to the Project field, Click Browse.

    5. In the Select Project dialog box, click your project.

    6. On the Main tab, in the Deployment section, in the Deployment method drop-down list, choose a deployment

    method.

    To install and debug your application on the simulator, choose Install and Launch.

    28

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    31/45

    To debug your application on the simulator without installing it, choose Launch.

    Note: You must install your application on the simulator at least once before you use this deployment method.

    7. In the Target field, type the IP address of your simulator.

    8. Click Apply.

    9. On the Common tab, in the Display in favorites menu list, select the Debug check box.

    29

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    32/45

    10. Click Apply.

    11. Click Debug to launch your application in the BlackBerry Tablet Simulator.

    In the main Flash Builder window, you can see the debug output in the Console pane.

    Run your application in Adobe Flash Builder 4.0

    To run your application, you must create a launch configuration in Adobe Flash Builder to package and deploy your

    application to the BlackBerry Tablet Simulator. If you are using Flash Builder 4.5, see "Run your application in Adobe

    Flash Builder 4.5".

    Before you begin: To deploy applications to the BlackBerry Tablet Simulator, you must enable development mode

    and retrieve the simulator's IP address. For more information about development mode, see "Enable developmentmode". For more information about retrieving the simulator's IP address, see "Retrieving the IP address of the

    BlackBerry Tablet Simulator".

    1. On the Run menu, select Run > Other.

    2. In the list of run configurations, select BlackBerry Tablet AIR Application.

    30

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    33/45

    3. Click the New button. The button is represented by a white rectangle with a yellow cross, above the list of debug

    configurations.

    4. Click Browse beside the Project field.

    5. Click your project in the list in the dialog box.

    6. On the Main tab, in the Deployment section, in the Deployment method drop-down list, choose a deployment

    method. You can choose to:

    Package your application into a .BAR file

    Install your application on the BlackBerry Tablet Simulator

    Launch your application on the BlackBerry Tablet Simulator without installing it

    Install and launch your application

    Uninstall your application

    Terminate your application

    7. On the Main tab in the Deployment section, in the Target field, type the IP address of your simulator.

    31

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    34/45

    8. Click Apply.

    9. On the Common tab, in the Display in favorites menu list, select the Run check box.

    32

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    35/45

    10. Click Apply.

    11. Click Run to launch your application in the BlackBerry Tablet Simulator.

    The following image shows the AIR Hello World application minimized in the simulator.

    33

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    36/45

    Testing your application using the command lineIf you do not have Adobe Flash Builder 4, you can use the command line tools included with the BlackBerry Tablet

    OS SDK to package and deploy applications to the BlackBerry Tablet Simulator. Before you can package yourBlackBerry Tablet OS application, you must compile your ActionScript project using the tools included in the Adobe

    Flex SDK. The Flex SDK also includes tools to debug your application on the BlackBerry Tablet Simulator. For more

    information about the Flex SDK, visit http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. For more

    information about testing your application using Flash Builder, see "Testing your application using Adobe Flash

    Builder".

    Package and deploy your application using the command line

    Before you begin:

    Use the command line tools included with the Adobe Flex SDK to compile your Adobe ActionScript project into

    a SWF application. Add the path to the bin subfolder where you installed the BlackBerry Tablet OS SDK to the PATH

    environment variable for your operating system. For more information about command line options, run

    blackberry-airpackager from the command line with no options.

    1. Open a command prompt.2. Navigate to the folder where your SWF application and XML configuration files are stored.

    3. Type the following command to package, deploy, and launch your application to the BlackBerry Tablet

    Simulator.

    blackberry-airpackager -package output_bar_file_name -installApp -launchAppproject_name-app.xml project_name.swf any_other_project_files-device IP_address -password password

    34

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    37/45

    Remove your application from the BlackBerry Tablet Simulator using thecommand line

    If you do not have Adobe Flash Builder 4, you can use the command line tools included with the BlackBerry TabletOS SDK to remove your application from the BlackBerry Tablet Simulator. For more information about command

    line options, run blackberry-airpackager from the command line with no options.

    1. Open a command prompt window.

    2. Type the following command to remove your application from the BlackBerry Tablet Simulator.

    blackberry-deploy -uninstallApp bar_file_name -device IP_address

    35

    l k bl l

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    38/45

    BlackBerry Tablet Simulator gestures 9The following tables describe the gestures recognized by the BlackBerry Tablet Simulator.

    Interactions from the bezel

    Most of the interactions from the bezel (the frame around the display area of the screen) apply to all applications.

    Gesture Result Type

    Click and drag the mouse from the top of the

    simulator screen.

    This action displays the menu. application-specific

    Click and drag the mouse from the bottomof the simulator screen.

    This action displays the navigator. system-wide

    Click and drag the mouse from the left or

    right side of the simulator screen.

    This action switches applications. system-wide

    Interactions with content on the screen

    You can implement the following interactions to allow users to directly manipulate content on the screen.

    Gesture Result

    Click the screen. This gesture initiates an action. For example, when you tap an

    application icon, the application opens.

    Click and drag the mouse across the screen. This gesture moves the content on the screen in the direction of

    the drag or swipe at the corresponding rate of speed. For example,

    users can move slowly through a list by dragging a finger on the

    screen or they can move quickly through a list by swiping across the

    screen.

    Click and hover over an item. This action highlights a sequence of characters, a word, a link, or an

    item such as an email message or picture.

    36

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    39/45

    P id f db k 11

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    40/45

    Provide feedback 11To provide feedback on this deliverable, visit www.blackberry.com/docsfeedback.

    38

    Document revision history 12

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    http://www.blackberry.com/docsfeedback
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    41/45

    Document revision history 12

    Date Description

    4 March 2011 Added the following topics:

    Approaches to application development for AdobeAIR

    Changed the following topics:

    System requirements

    Overview

    Install and integrate the BlackBerry Tablet OS SDK for Adobe AIR with Flash

    Builder

    Install the BlackBerry Tablet OS SDK for Adobe AIR without Flash Builder

    integration

    Configure a virtual machine for the BlackBerry Tablet Simulator

    30 November 2010 Added the following topics:

    System requirements

    Install the BlackBerry Tablet OS SDK for Adobe AIR

    Create an ActionScript Mobile AIR project in Adobe Flash Builder 4.5

    Debug your application in Adobe Flash Builder 4.5

    Run your application in Adobe Flash Builder 4.5

    Changed the following topics:

    Create an ActionScript project in Adobe Flash Builder 4.0

    Debug your application in Adobe Flash Builder 4.0 Run your application in Adobe Flash Builder 4.0

    8 November 2010 Added the following topics:

    Add an image to your ActionScript project

    Create an XML configuration file for your icon

    Creating your first application

    Debug your application in Flash Builder 4

    Remove your application from the BlackBerry Tablet Simulator Run your application in Flash Builder 4

    Testing your application from Adobe Flash Builder 4

    Testing your application from the command line

    Changed the following topics:

    Overview

    Package and deploy your application from the command line

    System requirements

    39

    Date Description

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    42/45

    Date Description

    25 October 2010 First draft released.

    40

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    43/45

    TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALL RIM BE

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    44/45

    LIABLE FOR ANY TYPE OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-

    PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES

    REFERENCED HEREIN INCLUDING WITHOUT LIMITATION ANY OF THE FOLLOWING DAMAGES: DIRECT,CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE, OR AGGRAVATED DAMAGES, DAMAGES

    FOR LOSS OF PROFITS OR REVENUES, FAILURE TO REALIZE ANY EXPECTED SAVINGS, BUSINESS INTERRUPTION, LOSS

    OF BUSINESS INFORMATION, LOSS OF BUSINESS OPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO

    TRANSMIT OR RECEIVE ANY DATA, PROBLEMS ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH

    RIM PRODUCTS OR SERVICES, DOWNTIME COSTS, LOSS OF THE USE OF RIM PRODUCTS OR SERVICES OR ANY PORTION

    THEREOF OR OF ANY AIRTIME SERVICES, COST OF SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES OR SERVICES,

    COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY LOSSES, WHETHER OR NOT SUCH DAMAGES WERE FORESEEN OR

    UNFORESEEN, AND EVEN IF RIM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, RIM SHALL HAVE NO OTHER

    OBLIGATION, DUTY, OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TO YOU INCLUDING ANY

    LIABILITY FOR NEGLIGENCE OR STRICT LIABILITY.

    THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATURE OF THE

    CAUSE OF ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OF CONTRACT,

    NEGLIGENCE, TORT, STRICT LIABILITY OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE A FUNDAMENTAL BREACH

    OR BREACHES OR THE FAILURE OF THE ESSENTIAL PURPOSE OF THIS AGREEMENT OR OF ANY REMEDY CONTAINED

    HEREIN; AND (B) TO RIM AND ITS AFFILIATED COMPANIES, THEIR SUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS

    (INCLUDING AIRTIME SERVICE PROVIDERS), AUTHORIZED RIM DISTRIBUTORS (ALSO INCLUDING AIRTIME SERVICE

    PROVIDERS) AND THEIR RESPECTIVE DIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS.

    IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR, EMPLOYEE,

    AGENT, DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF RIM OR ANY AFFILIATES OF RIM HAVE ANY

    LIABILITY ARISING FROM OR RELATED TO THE DOCUMENTATION.

    Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility to ensure

    that your airtime service provider has agreed to support all of their features. Some airtime service providers might

    not offer Internet browsing functionality with a subscription to the BlackBerry Internet Service. Check with your

    service provider for availability, roaming arrangements, service plans and features. Installation or use of Third Party

    Products and Services with RIM's products and services may require one or more patent, trademark, copyright, or

    other licenses in order to avoid infringement or violation of third party rights. You are solely responsible for

    determining whether to use Third Party Products and Services and if any third party licenses are required to do so.

    If required you are responsible for acquiring them. You should not install or use Third Party Products and Servicesuntil all necessary licenses have been acquired. Any Third Party Products and Services that are provided with RIM's

    products and services are provided as a convenience to you and are provided "AS IS" with no express or implied

    conditions, endorsements, guarantees, representations, or warranties of any kind by RIM and RIM assumes no liability

    whatsoever, in relation thereto. Your use of Third Party Products and Services shall be governed by and subject to

    you agreeing to the terms of separate licenses and other agreements applicable thereto with third parties, except

    to the extent expressly covered by a license or other agreement with RIM.

    42

    Certain features outlined in this documentation require a minimum version of BlackBerry Enterprise Server,

    RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.

  • 8/6/2019 Blackberry Tablet OS SDK for Adobe AIR-Getting Started Guide for Windows Developers--1441836-0207090108-001-0.9.3 Beta-US

    45/45

    BlackBerry Desktop Software, and/or BlackBerry Device Software.

    The terms of use of any RIM product or service are set out in a separate license or other agreement with RIM applicable

    thereto. NOTHING IN THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESS WRITTEN AGREEMENTS ORWARRANTIES PROVIDED BY RIM FOR PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS

    DOCUMENTATION.

    Research In Motion Limited295 Phillip StreetWaterloo, ON N2L 3W8Canada

    Research In Motion UK LimitedCentrum House36 Station RoadEgham, Surrey TW20 9LFUnited Kingdom

    Published in Canada

    43