Develop using the BlackBerry WebWorks SDK for BlackBerry...

87
Develop using the BlackBerry WebWorks SDK for BlackBerry Tablets (1 of 4) 1 February 1, 2011 “Getting Started” Adam Stanley Prosanta Bhattacherjee BlackBerry Developer Relations

Transcript of Develop using the BlackBerry WebWorks SDK for BlackBerry...

Page 1: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Develop using the BlackBerry WebWorks SDK for BlackBerry

Tablets (1 of 4)

1February 1, 2011

“Getting Started”

Adam Stanley

Prosanta Bhattacherjee

BlackBerry Developer Relations

Page 2: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

2

BlackBerry WebWorks Application Platform Overview

Page 3: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

BlackBerry WebWorks is an application platform that enables developers to create standalone applications using modern and standardized web technologies.

WebWorks applications can be fully-featured “Super Apps” through their ability to integrate with native BlackBerry and PlayBook features.

What is BlackBerry WebWorks?

BlackBerry and PlayBook features.

Page 4: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Application

power

BlackBerry Programming Models

Simplicity of development

and maintenance

• Hitting the sweet spot means

• The richness of device access and reuse of assets

• The simplicity of the browser programming model

Page 5: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Native Application BlackBerry Browser

Native-based UI Browser-based UI

Functionality provided by BlackBerry OS Functionality provided by Browser Engine

WebWorks Platform

Developer Spectrum

5

• Where in the spectrum do developers gravitate to?

• Do they create a Native application (Highly functional)?

• Do they create Web content for the Browser (Flexible UI and low cost)?

• Or a mix of the two?

Page 6: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

BlackBerry Smartphone BlackBerry PlayBook

Web = Platform Plurality

• It’s a diverse world out there for developers!

• Strong Web standards offer support across multiple

platforms

• Reuse Web assets and developer skills to create BlackBerry apps

• Each platform seeing growth in access to native

functionality

• Access the richness and differentiators of each platform

Page 7: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Hollywood Bowl

(LA Philharmonic)Loca FM

Real World Examples

Superheroes Alliance

(Uken Games)Campus Party

(Contento Media)

Guitar Chords

(My App Catalog)

(LA Philharmonic)

Sea-Web

(Nitobi)

Loca FM

(Vanatur World Mobile)

Page 8: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

8

Features and Capabilities

Page 9: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Services &Content

WEBSERVICES APPLICATION

INTEGRATION

BROWSER ENGINE

What Can a WebWorks App Do?

GPS

PUSH

MENUS

INTEGRATION

STORAGE

SYSTEM EVENTS

SQLite

FileSystem

Page 10: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• WebKit rendering engine added to BlackBerry® 6 and

BlackBerry Tablet OS

• BlackBerry WebWorks applications benefit from strengths of

WebKit

• Combine the power of HTML5 and CSS3 with JavaScript APIs

Web Platform Powered by WebKit

http://entanglement.gopherwoodstudios.com/light

Page 11: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Improved high fidelity WebKit browser engine

• Better support of HTML5 and CSS3 standards

• Package existing Flash content into a PlayBook application

• Full support of Adobe Flash 10.1

PlayBook Web Platform

• Faster hardware

• 1Ghz dual core processor

• 1Gb Ram

Page 12: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

WebWorks JavaScript Extensions

• Custom objects that can connect browser engine with

underlying Java code

• BlackBerry WebWorks apps can be more than just web content

• Enables “Super App” functionality

http://www.blackberry.com/developers/docs/webworks/api/playbook/

Page 13: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

WebWorks API Examples

• Application and system events

• onBackground, onCoverageChange, etc.

• Application launcher

• Invoke native apps with data, invoke third-party apps with invoke third-party apps with data

• System properties

• Change home screen icon,

background, etc.

• User interface

• System Dialogs

Page 14: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Sample Code: Application Integration

<script type="text/JavaScript">function openVideoCamera(){var args = new blackberry.invoke.CameraArguments();args.view = blackberry.invoke.CameraArguments.VIEW_RECORDER;blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args);

}</script></script>

Page 15: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

15

Architecture

Page 16: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Architecture: How Does it Work?

WebKit EngineWebKit Engine

Your app

• User interface

– Powered by Web

– HTML and CSS

• Application logicWebWorks PlatformWebWorks Platform

SecuritySecurity

PIMPIM

StorageStorage

PushPush

MediaMedia

HardwareHardware

BBMBBM

MonetizationMonetization

CompressionCompression

BackgroundBackground

Multi-TaskingMulti-Tasking

BlackBerry Platform

……

• Application logic

– JavaScript®

– WebWorks APIs

– Access to Platform OS

Page 17: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

RIM developer

OSS CommunityBlackBerry WebWorks Platform

Contribute

Github

Open Source Community

RIM developer

OS developer

App developer

OSS Code

(source)Consume

Participate

• Create

Contribute

Participate

Review

WebWorks

Application

http://www.github.com/blackberry

Page 18: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• BlackBerry WebWorks applications are supported on

– BlackBerry PlayBook

– BlackBerry 6

– BlackBerry Device Software version 5.0

Market for WebWorks Applications

http://us.blackberry.com/developers/choosingtargetos.jsp

Page 19: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

19

Development Tools

Page 20: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

1. Setup Development Environment

2. Write application content (HTML, CSS, JavaScript

files)

How do you build BlackBerry WebWorks Applications?

3. Create a ZIP archive containing these Web assets

4. Package your application using the WebWorks SDK

Page 21: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

BlackBerry WebWorks

SDK for PlayBook

Adobe AIR SDK

BlackBerry PlayBook

PlayBook

Development

BlackBerry WebWorks SDK Development Tools

SDK for PlayBook

WebWorks

Application

Archive (ZIP)

HTML

CSS

JavaScript

Page 22: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

BlackBerry WebWorks

SDK for PlayBook

Adobe AIR SDK

BlackBerry PlayBook

*.bar

PlayBook

Development

BlackBerry WebWorks SDK Development Tools

Java SDK

BlackBerry

WebWorks SDK

SDK for PlayBook

BlackBerry Smartphone

WebWorks

Application

Archive (ZIP)

*.cod

Smartphone

Development

Page 23: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Adobe AIR SDK

• http://www.adobe.com/products/air/sdk/

• BlackBerry WebWorks SDK for Tablet OS

• http://us.blackberry.com/developers/tablet/webworks.jsp

Required Development Tools

• VMware Player

• http://www.vmware.com/products/player/

• BlackBerry PlayBook Simulator

• http://us.blackberry.com/developers/tablet/webworks.jsp

Page 24: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

24

Installing the Adobe AIR SDK

Page 25: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Download the AIR SDK from Adobe’s website:

• http://www.adobe.com/products/air/sdk/

Step 1: Installing the Adobe AIR SDK

Page 26: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Extract the contents of the AIR SDK to your computer:

• Recommend “C:\Program Files\Adobe\AirSDK” for Windows

Step 1: Installing the Adobe AIR SDK

Page 27: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 1: Installing the Adobe AIR SDK

Page 28: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

28

Setting Up The WebWorks SDK For PlayBook

Page 29: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Download the BlackBerry WebWorks SDK for Tablet OS:

• http://us.blackberry.com/developers/tablet/webworks.jsp

Step 2: Setting up the SDK

Page 30: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 2: Setting up the SDK

Page 31: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 2: Setting up the SDK

Page 32: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Enter the location of where you extracted the

contents of the AIR SDK in Step 1

Step 2: Setting up the SDK

Page 33: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 2: Setting up the SDK

C:\Program Files\Research In Motion\BlackBerry WebWorks Packager for PlayBook

Page 34: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 2: Setting up the SDK

Page 35: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

35

Installing VMware Player

Page 36: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Download the VMware player from VMware's website:

• http://www.vmware.com/products/player/

Step 3: Installing VMware Player

Page 37: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 3: Installing VMware Player

Page 38: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 3: Installing VMware Player

Page 39: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 3: Installing VMware Player

Page 40: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• VMware installation requires a system restart

• Coffee break …

Step 3: Installing VMware Player

Page 41: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

41

BlackBerry PlayBook Simulator

Page 42: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Download the BlackBerry PlayBook Simulator:

• http://us.blackberry.com/developers/tablet/webworks.jsp

Step 4: Setting Up The Simulator

Page 43: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 44: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 45: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Choose a location to install simulator

• Installation unpacks a ISO file that will be used by the VMware player

• Recommend “C:\device simulators\<simulator name>” on Windows

Step 4: Setting Up The Simulator

Page 46: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 47: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 48: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 49: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Browse to location where you installed simulator ISO file

• C:\device simulators\<simulator name>\<ISO file>

Step 4: Setting Up The Simulator

Page 50: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 51: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 52: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 53: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 54: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 55: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 56: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 57: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 58: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

To direct input to virtual machine, press CTRL + G

To return to your computer, press CTRL + ALT

Page 59: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 60: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 61: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 62: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Step 4: Setting Up The Simulator

Page 63: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

63

Writing An App“Hello World”

Page 64: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Open your favorite text editor

• Create a new file named index.html

• Add the following HTML content to this file:

<html>

<head>

<style type="text/css">

Start Writing Code

<style type="text/css">

body { font-size: 5em; }

</style>

</head>

<body>

<p> Hello World </p>

</body>

</html>

Page 65: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Create a second file named config.xml

• Add the following XML content to this file:

<?xml version="1.0" encoding="UTF-8"?>

<widget xmlns="http://www.w3.org/ns/widgets"

Start Writing Code

<widget xmlns="http://www.w3.org/ns/widgets"

xmlns:rim="http://www.blackberry.com/ns/widgets"

version="1.0.0.0">

<name>helloWorld</name>

<content src="index.html"/>

</widget>

Page 66: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Create an archive (ZIP) named helloWorld.zip containing

the index.html and config.xml files

Start Writing Code

Page 67: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Using the BlackBerry WebWorks Packager (bbwp.exe) • Command line tool used to package the ZIP file

• From a command prompt navigate to the WebWorks SDK

installation folder:

• C:\Program Files\Research In Motion\BlackBerry WebWorks

Packager for PlayBook\bbwp

bbwp [drive:][path]archive [/s [dir]] [/o dir]

Start Writing Code

bbwp [drive:][path]archive [/s [dir]] [/o dir]

archive Specifies the .zip file to compile/s Save source. The default behavior is to not save

the source files. If dir is specified then creates dir\src\ directory structure. If no dir specifiedthen the path of archive is assumed

/o Redirects output file location to dir. If both /oand dir are not specified then the path of archive is assumed

/v Turn on verbose messages/h Display this usage information

Page 68: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

C:\Program Files\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp>bbwp "c:\sandbox\web apps\helloWorld\helloWorld.zip"[INFO] Parsing command line options

• Run the BlackBerry WebWorks Packager (bbwp.exe)• Packages the helloWorld.zip file into a helloWorld.bar PlayBook application

Start Writing Code

[INFO] Parsing command line options[INFO] Parsing bbwp.properties[INFO] Validating WebWorks archive[INFO] Parsing config.xml[WARNING] Failed to find a <feature> element[WARNING] Failed to find the <author> element[INFO] Populating application source[INFO] Compiling WebWorks application[INFO] Packaging the bar file[INFO] Bar packaging complete[INFO] WebWorks application packaging complete

Page 69: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Start Writing Code

Page 70: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

70

Deploying An Application

Page 71: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 72: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 73: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 74: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 75: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 76: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 77: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 78: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Use the BlackBerry Tablet OS SDK

• Installed as part of the WebWorks SDK for PlayBook

• Open a command prompt and navigate to:

• C:\Program Files\Research In Motion\BlackBerry WebWorks

Packager for PlayBook\bbwp\blackberry-tablet-sdk

Deploying Your Application

Packager for PlayBook\bbwp\blackberry-tablet-sdk

• Contains developer tools for BlackBerry Tablet OS:

• bin\blackberry-packager

• bin\blackberry-deploy

• bin\blackberry-signer

Page 79: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

blackberry-deploy -installApp -device <device IP>

-package <BAR file path> -password <device password>

C:\Program Files\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp\blackberry-tablet-sdk>blackberry-deploy -installApp -device 192.168.198.134 -package "c:\sandbox\web apps\helloWorld\bin\helloWorld.bar" -password pass

Deploying Your Application

web apps\helloWorld\bin\helloWorld.bar" -password pass

Sending Install request...Info: Action: InstallInfo: File size: 40731Info: Installing ...actual_dname::helloWorld1a833da63a6b7e2098dae6d0662e1.MjA5OGRhZTZkMDY2MmUxICAgICAactual_id::MjA5OGRhZTZkMDY2MmUxICAgICAactual_version::1.0.0.0result::success

Page 80: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 81: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Deploying Your Application

Page 82: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

82

Getting Help

Page 83: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• BlackBerry WebWorks SDK for Tablet OS:

• http://us.blackberry.com/developers/tablet/webworks.jsp

• Getting started guides for Windows and Mac

• Developer tools and sample code downloads

• Development and API reference guides

Where To Find Help?

• BlackBerry Development Community

• Developers Blog: http://devblog.blackberry.com

• Twitter: http://twitter.com/BlackBerryDev

• Community Web Forum: http://bit.ly/8o5EMp

Page 84: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Where To Find Help?

Weather

Download sample code from the BlackBerry

Development Knowledge Base: http://bit.ly/bisiGf

SketchPad RSS Reader

Page 85: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• Developing using BlackBerry WebWorks SDK for BlackBerry

Tablets

– February 1, 2011: Getting Started

– February 3, 2011: My First App

– February 8, 2011: BlackBerry PlayBook Integration

Webcast Series

– February 10, 2011: User Interface Guidelines and Best Practices

http://webcast.streamlogics.com/audience/index.asp?eventid=49950807

Page 86: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

• BlackBerry and PlayBook WebWorks Application Platform

• Create standalone applications using Web technologies

• Extensions can provide integration with device functionality

Summary

• Extensions can provide integration with device functionality

• Use Command Line Tools to build and deploy applications to

PlayBook

Page 87: Develop using the BlackBerry WebWorks SDK for BlackBerry ...cwhandy.com/Webinar_1_-_Getting_Started.pdf · Develop using the BlackBerry WebWorks SDK for BlackBerry ... Adobe AIR SDK

Questions and Answers

• Free BlackBerry PlayBook tablet offer

• www.blackberry.com/developers/blackberryplaybookoffer

• Next webcast on Feb 3 at 2:00 pm EST

• My First App

87