Androider.ro - Develop apps for BlackBerry Playbook tablet

38
Develop apps for BlackBerry Playbook Tablet Marius Mailat December 24, 2010

description

Step by step instructions on how to develop a BlackBerry Playbook application.

Transcript of Androider.ro - Develop apps for BlackBerry Playbook tablet

Page 1: Androider.ro - Develop apps for BlackBerry Playbook tablet

Develop apps for BlackBerry Playbook Tablet

Marius MailatDecember 24, 2010

Page 2: Androider.ro - Develop apps for BlackBerry Playbook tablet

Agenda

1. Why this presentation?

2. What do I need to download?

3. How do I install the development environment?

4. How do I setup the OS Playbook simulator?

5. Your first application in Flash Builder Burrito

6. How I run and debug the apps?

7. How do I codesign an app?

8. How do I submit an app in AppWorld?

9. Resources

10. Source code example

2

Page 3: Androider.ro - Develop apps for BlackBerry Playbook tablet

1. Why this presentation? As announced at the Adobe® MAX conference earlier this year, developers who create an application for the BlackBerry PlayBook tablet that is approved for distribution through BlackBerry App World prior to the tablet’s initial release are eligible for a free BlackBerry PlayBook tablet. Deadline 1st February 2011

The primary criterion for the free offer is to have an application accepted into BlackBerry App World for the BlackBerry PlayBook tablet prior to the initial North American launch in early 2011. Even though developers are encouraged to submit multiple applications, a developer can only qualify for one free BlackBerry PlayBook tablet.

Full terms and conditions of the offer can be found at: http://us.blackberry.com/developers/tablet/playbook_offer.jsp

Page 4: Androider.ro - Develop apps for BlackBerry Playbook tablet

2. What do I need to download? Download Adobe Flash Builder Burrito ( flashbuilder_burrito_287807.exe )

Download BlackBerry Tablet OS SDK for Adobe AIR ( BlackBerryTabletSDK-Air-Installer-0.9.1-Win.exe )

Download BlackBerry Tablet Simulator Beta ( BlackBerryPlayBookSimulator-Installer-Win.exe  )

Download VMware Player  ( VMware-player-3.1.3-324285.exe )

* To get the above packages you 4 accounts created. Adobe Flash Builder can be receive free as student or if you are unemployed using this link.

Page 5: Androider.ro - Develop apps for BlackBerry Playbook tablet

3. How do I install the dev environment?

Install step1_flashbuilder_burrito_287807.exe, no serial number, choose to run as trial

Install step2_BlackBerryPlayBookSimulator-Installer-Win.exe choose as install folder C:/Playbook

Install step3_VMware-player-3.1.3-324285.exe

Install step4_BlackBerryTabletSDK-Air-Installer-0.9.1-Win.exe and follow the bellow suggestions ( you must use 1:1 exact the same folders as in the screenshots )

Page 6: Androider.ro - Develop apps for BlackBerry Playbook tablet

• Install step4_BlackBerryTabletSDK-Air-Installer-0.9.1-Win.exe and follow the bellow suggestions ( you must use 1:1 exact the same folders as in the screenshots )

Page 7: Androider.ro - Develop apps for BlackBerry Playbook tablet

Restart the system

Start the VMware player and click on “Create a New Virtual Machine”

Choose the image C:\Playbook\BlackBerryPlayBookSimulator.iso

4. How do I setup the Playbook OS simulator?

Page 8: Androider.ro - Develop apps for BlackBerry Playbook tablet

Restart the system

Start the VMware player and click on “Create a New Virtual Machine”

Choose the image C:\Playbook\BlackBerryPlayBookSimulator.iso

4. How do I setup the Playbook OS simulator?

Page 9: Androider.ro - Develop apps for BlackBerry Playbook tablet

Choose Other at Guest operating system and at Version also Other

Page 10: Androider.ro - Develop apps for BlackBerry Playbook tablet

Choose the destination for the files

Page 11: Androider.ro - Develop apps for BlackBerry Playbook tablet

Specify the disk capacity – 2 Gb

Page 12: Androider.ro - Develop apps for BlackBerry Playbook tablet

Click Next and than “Customize hardware”

Choose memory in left side, choose 1024 at memory

Page 13: Androider.ro - Develop apps for BlackBerry Playbook tablet

Choose display in left side, choose “Accelerate 3D graphics”

Page 14: Androider.ro - Develop apps for BlackBerry Playbook tablet

Click OK and Finish

The installation will start, type Y and ENTER (when the question regarding filesystem will appear)

Page 15: Androider.ro - Develop apps for BlackBerry Playbook tablet

Using CTRL+ALT you can return from VMware anytime in your system

The installation can take 10 minutes

When the installation is ready click on the “I finished Installing” (do not forget this as without it the system will not start, once the QNX 1.2 boot load will appear)

It is possible that you must install 1-2 times the ISO image, in 2 test systems I was never able to make it from ready in 1 step

Once the image start will look like this

Page 16: Androider.ro - Develop apps for BlackBerry Playbook tablet

Click on the Wheel in the TOP-RIGHT

Page 17: Androider.ro - Develop apps for BlackBerry Playbook tablet

Click Security on the left and then Enable (near Development settings). Choose a password and save it in mind.

Your device is in development mode and a HAMMER icon will exists, click on it and you will see an IP of the device.

Page 18: Androider.ro - Develop apps for BlackBerry Playbook tablet

5. Your first application in Flash Builder Burrito

Start Adobe Flash Builder

In the left navigation click New -> Actionscript Mobile Project

In project name choose: DemoApp

In the Flex SDK version select Use default SDK(Flex Hero)

Click Next

In the Target platform clear the Google Android checkbox

Click Finish

Page 19: Androider.ro - Develop apps for BlackBerry Playbook tablet

Double click DemoApp.as

Enter the following code ( to be find on the next page )

Page 20: Androider.ro - Develop apps for BlackBerry Playbook tablet

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 DemoApp extends Sprite

{

public function DemoApp()

{

var helloButton:LabelButton = new LabelButton();

helloButton.label = "Hello World!";

helloButton.x = (stage.stageWidth - helloButton.width)/2;

helloButton.y = (stage.stageHeight - helloButton.height)/2;

var text:TextField = new TextField();

text.text = "Close";

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();

} } }

Page 21: Androider.ro - Develop apps for BlackBerry Playbook tablet

6. How I run and debug the apps?

• On the Run menu, click Run Configurations• In the list of run configurations, click Mobile Application• On the Main tab, in the Launch method section, select the

On device option.• In the Deployment section, in the Target field, type the IP

address of your simulator.• In the Deployment section, in the Device password field,

enter the password of your simulator.• Click Apply and Run ( the simulator must be started )

Page 22: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 23: Androider.ro - Develop apps for BlackBerry Playbook tablet

The application will start on the device

Page 24: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 25: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 26: Androider.ro - Develop apps for BlackBerry Playbook tablet

7. How do I codesign an app?

• In this moment an app cannot be signed

Page 27: Androider.ro - Develop apps for BlackBerry Playbook tablet

8. How do I submit an app in AppWorld?

• You must register a vendor account (which normally costs 200$)• For the vendor account you need a notarized statement of

identification (notariell beglaubigte Ausweiskopie ( 10 euro + Mwst)• You must follow the steps in the following screens• Once an app is submitted it is placed in Review

RIM evaluates ethical, competitive and functional fit of the app Vendor is contacted if any branding issues or errors in metadata exist The app is also tested for technical validation Once an app meets expectations it is Approved in the portal The Vendor now lists the app for sale/download

Page 28: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 29: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 30: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 31: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 32: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 33: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 34: Androider.ro - Develop apps for BlackBerry Playbook tablet

9. Resources Getting Started Guide for Windows Developers

Detailed documentation

API Reference

Developing for BlackBerry Tablet OS using Flash

Ask a question in the forum

Webcast 1: Develop using Adobe Air SDK

Webcast 2: How I develop my first application

Webcast 3: BlackBerry PlayBook tablet integration

Webcast 4: UI Guidelines

Webcast 5: Register an account for BlackBerry App World

Page 35: Androider.ro - Develop apps for BlackBerry Playbook tablet

Create a ActionScript Mobile AIR project in Flash Builder 4.5

Add an icon to your ActionScript project

Create an XML configuration file for icon

Testing your application from Adobe Flash Builder 4.5

Testing your application from the command line

Run the applications

Package and deploy your application from the command line

Remove your application from the BlackBerry Tablet Simulator from the command line

ASDocs from QNX packages

ASDocs from Adobe packages

Page 36: Androider.ro - Develop apps for BlackBerry Playbook tablet

10. Source code examplesOfficial exemple BlackBerry of using Web Services

Air samples from Adobe

Ten Tips for building better AIR apps

Multitouch and Gesture Support on the Flash Player

Configuring ActionScript-Only Projects with Flash Builder 4

Writing multiscreen AIR apps

AS34J: ActionScript 3 for Java Developers Seminar

Page 37: Androider.ro - Develop apps for BlackBerry Playbook tablet
Page 38: Androider.ro - Develop apps for BlackBerry Playbook tablet

Thank you, Q&A.

You can find me on:

• Email - [email protected] • Twitter – twitter.com/fastlink2• Web – http://fastlink2.com

38