36
Desarrollo con AIR para Playbook Memo Döring [Logo (opcional)]

Desarrollo con AIR para Playbook

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Desarrollo con AIR para Playbook

Desarrollo con AIR para Playbook

Memo Döring

[Logo (opcional)]

Page 2: Desarrollo con AIR para Playbook

Introduction

• Memo Döring– LATAM Team Lead, Developer Relations

RIM–@memodoring

Page 3: Desarrollo con AIR para Playbook

What is the BlackBerry PlayBook?

• 1 GHz dual core processor• 1 GB Ram• 7" LCD display, 1024 x 600 screen resolution• 1080p HD video; H.264, MPEG4, WMV HDMI video output• High fidelity WebKit browser• Full Adobe® Flash® 10.1 support• High definition cameras

• 3MP front facing

• 5MP rear facing• Wi-Fi® 802.11 a/b/g/n• Micro USB and Micro HDMI • Weighs 0.9 lbs (400g)

Page 4: Desarrollo con AIR para Playbook

Pair BlackBerry PlayBook with a BlackBerry Smartphone• Push Technology• Email, Calendar, BBM and more

Ideal for games, media, apps and uncompromised Internet• OpenGL Acceleration

Powerful QNX technology• True multi-tasking• What the web runs on!

Unleashing The Whole Web, At Blazing Speeds

What is the BlackBerry PlayBook?

Page 5: Desarrollo con AIR para Playbook

Setting Up your Environment

• Downloads– Flash Builder 4.5– Tablet OS SDK– VM Ware Fusion• www.blackberry.com/developers/tabletos

• Code Signing• https://www.blackberry.com/SignedKeys/

• App World • www.blackberry.com/developers/appworld/

Page 6: Desarrollo con AIR para Playbook

Setting Up your Environment

Page 7: Desarrollo con AIR para Playbook

Setting Up your Environment

• The Simulator– In VMware Fusion, click File > Open.– On the Open screen, navigate to the location

where you installed the BlackBerry® Tablet OS SDK forAdobe® AIR®. • The default location is /Developer/SDKs/Research In

Motion/blackberry-tablet-sdk-<version>/BlackBerryPlayBookSimulator-<version>.

– Select the BlackBerryPlayBookSimulator.vmx file.

– Click Open.– Click OK

Page 8: Desarrollo con AIR para Playbook

8

Page 9: Desarrollo con AIR para Playbook

Creating Your First App

• Flash Builder project– http://bit.ly/PBfirstapp

• Signing setup– http://bit.ly/PBsignapp

Page 10: Desarrollo con AIR para Playbook

blackberry-tablet.xml

• Used to specify platform specific items

• Customize your splash screen• Customize your app icon• Set app capabilities• Set Publisher tag for signing

Page 11: Desarrollo con AIR para Playbook

blackberry-tablet.xml

• Custom App Icon–<icon><image>someicon.png</

image></icon>– Path is relative to the root of your app– Icon should be 86x86– Anything bigger than 90x90 will be

ignored

Page 12: Desarrollo con AIR para Playbook

blackberry-tablet.xml

• Custom Splash Screen–<splashscreen>landscape.png:portrait.p

ng</splashscreen>– Image path relative to app root folder– Images should be 1024x600 and

600x1024

Page 13: Desarrollo con AIR para Playbook

blackberry-tablet.xml

• Application Capalbilites– <permission>use_camera</permission>– <permission>read_geolocation</permission>– <permission>play_audio</permission>– <permission>access_internet</permission>– <permission>access_shared</permission>– <permission>record_audio</permission>– <permission>set_audio_volume</permission>– <permission>read_device_identifying_informati

on</permission>

Page 14: Desarrollo con AIR para Playbook

Application and System States

• App States (Dispatched by NativeApplication)• Activated – Standard AIR Event – Event.ACTIVATE• Deactivated – Standard AIR Event –

Event.DEACTIVATE

• System States (Dispatched by QNXSystem)• Active – QNXSystemEvent.ACTIVE• Standby – QNXSystemEvent.STANDBY

• Default behaviour for Deactivated apps and System Standby is to switch app to a lower power mode

Page 15: Desarrollo con AIR para Playbook

• Power Modes• Normal - periodic timer that runs at the

frame rate• Throttled - rendering is disabled and the

periodic timer runs at a maximum of 4Hz• Standby - rendering is disabled the AIR

timer is stopped entirely

Application and System States

Page 16: Desarrollo con AIR para Playbook

• Automatic Mode changes (app descriptor file– <qnx><inactivePowerMode>throttled</inactivePowerMode></qnx>

• Programmatically change current mode– QNXSystem.system.powerMode = QNXSystemPowerMode.NORMAL;

QNXSystem.system.powerMode = QNXSystemPowerMode.THROTTLED;QNXSystem.system.powerMode = QNXSystemPowerMode.STANDBY;

• Transition Time– You can set the time that the Deactivate state takes to take

effect– QNXSystem.system.transitionTime = 3000; – Allows for you to finish animations, save state or any last

cleanup;

Application and System States

Page 17: Desarrollo con AIR para Playbook

17

User Action Result

Tap the screen Initiates an action in the app

Drag or swipe across the screen

This action moves the content on the screen in the direction of the dragor swipe and at the corresponding rate of speed

Touch and hold a finger on an item.

This action highlights a sequence of characters, a word, a link, or an itemsuch as an email message or picture.

Pinch open or pinch close. These actions zoom in to and out from an item

A Touch-centric App

Page 18: Desarrollo con AIR para Playbook

18

A Touch-centric App

User Action Result Type

Drag or swipe from the top of the screen

This action displays the menu

application-specific

Drag or swipe from the bottom of the screen

This action displays the navigator

system-wide

Drag or swipe from the left or right side of thescreen

This action switches applications

system-wide

Page 19: Desarrollo con AIR para Playbook

Adding a swipe gesture//Top down swipe is left for developers to implement an //application menuprivate _menu:MyMenuBar; //Custom menu bar

private function init():void {_menu.initializeUI();app.addEventListener(QNXApplicationEvent.SWIPE_DOWN,

swipeDown);}

private function swipeDown(e:QNXApplicationEvent):void {if(! _menu.isVisible()) {

_menu.show();}

}

19

A Touch-centric App

Page 20: Desarrollo con AIR para Playbook

20

A Touch-centric App

Page 21: Desarrollo con AIR para Playbook

21

• Keeping the Backlight On– The maximum supported size of a BlackBerry® Tablet

OS– BlackBerry PlayBook.  Adobe® AIR® applications can

override this backlight time-out period value and keep the screen on indefinitely

if(keepLightOn) { NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;} else { NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.NORMAL;}

A Touch-centric App

Page 22: Desarrollo con AIR para Playbook

Applications will be run in the directory we call "sandbox” and should not attempt to access any files outside of this directory.  

Sandbox structure •  app – app/air is read only link to where application files are

installed•  data – read/write access area. $HOME env var is set to this

directory•  tmp – system may remove files stored here any time app is

not running•  logs - stdin and stdout redirected to logs/log file; stores "core"

files•  shared - link to common location where all apps share files

 

App/data/tmp/logs are the app's private directories 

File Access

Page 23: Desarrollo con AIR para Playbook

Alias PathFile.applicationDirectory (appname)/app/airFile.applicationStorageDirectory (appname)/data

File.desktopDirectory (appname)/shared/documentsFile.documentsDirectory (appname)/shared/documentsFile.userDirectory (appname)/

Shared file structure:•photos•bookmarks•misc•books

•documents•voice•downloads•music•videos

File class mapping:

File Access

Page 24: Desarrollo con AIR para Playbook

Applications will be run in the directory we call Users must grant your application access to the above folders within the shared directory. To request access, you need to include the following snippet in your blackberry-tablet.xml file.  <qnx>     <action>access_shared</action> </qnx>  

File Access

Page 25: Desarrollo con AIR para Playbook

• Battery level• Battery state• Hardware ID• Device OS• Device PIN• Platform Version• Vendor ID

• Capture battery events for app lifecycle

• Identify your users based on PIN

• Identify the Device OS for functionality

Device Information

Page 26: Desarrollo con AIR para Playbook

Device Information

Page 27: Desarrollo con AIR para Playbook

• Monitor battery levels for power consumption in your app

• Customize your app to provide the user experience

• Display battery and charging information from your app

Device Information

Page 28: Desarrollo con AIR para Playbook

Camera Capabilities

• Camera class support• Ability to choose rear or

front facing camera• Camera UI class

• Ability to launch camera and take a picture of video

• CameraRoll class• Ability to select an

image from the camera roll

• Ability to add an image to the camera roll

Page 29: Desarrollo con AIR para Playbook

• Key Statistics– 3 million Average Daily Downloads– 35 million Downloads of App World client – Available in 100+ Countries– 6 Languages –(EFIGS, Brazilian Portuguese)– 26 Currencies– Carrier Billing with multiple major carriers – Over 30,000 apps available for download or purchase including 2,000+ apps for BlackBerry PlayBook

• FREE to register as a vendor and FREE to submit apps and upgrades

App World

Page 30: Desarrollo con AIR para Playbook

April-09

June

-09

Augus

t-09

Octob

er-0

9

Decem

ber-0

9

Febr

uary

-10

April-10

June

-10

Augus

t-10

April-09

June

-09

Augus

t-09

Octob

er-0

9

Decem

ber-0

9

Febr

uary

-10

April-10

June

-10

Augus

t-10

• Credit Card and Carrier Billing introduced in August 2010 to add to consumer payment method options

• 82% increase in gross sales with launch of AT&T carrier billing in App World 2.0

• Working with our carrier partners to expand support for carrier billing

App World

Page 31: Desarrollo con AIR para Playbook

•Indonesia ranks 5th, Mexico ranks 8th, and Australia ranks 10th for global sales after less than 30 days

•LATAM and APAC consumers are growing opportunities for revenue

•New countries in the top 25– Australia, South Africa, India, Turkey,

Brazil, Singapore, Japan, Malaysia, Switzerland, South Korea, Thailand, Colombia, Venezuela, Ecuador

APAC7%

EMEA

21%

LATAM5%

NA68%

Rank Country Paid Apps Launches

1 United States April 1, 2009

2 United Kingdom April 1, 2009

3 Canada April 1, 2009

4 France July 31, 2009

5 Indonesia August 19, 2010

6 Germany July 31, 2009

7 Italy July 31, 2010

8 Mexico August 19, 20109 Netherlands July 31, 2009

10 Australia August 19, 2010

App World

Page 32: Desarrollo con AIR para Playbook

• Download Tools, Sample Code, Docs, and Videos– BlackBerry® Developer Zone

www.blackberry.com/developers

• Ask for help– Support Forums

supportforums.blackberry.com

– Issue Trackerblackberry.com/developers/issuetracker

• Stay In Touch– Twitter® @BlackBerryDev

– Blog devblog.blackberry.com

• Get Connected– Developer Groups

blackberry.com/developers/community

– Alliance Program blackberry.com/partners

Getting Started

Page 33: Desarrollo con AIR para Playbook

• $3M USD in Prizes – Biggest Challenge Ever!

• Series of Three Global Competitions – Best Adobe Flash or Adobe AIR app

(Now Open! April 28 – August 12, 2011)

– Most innovative BlackBerry WebWorks app on BlackBerry PlayBook tablets and

BlackBerry 6 (Opens May 9 – August 26, 2011)– Most addicting social app using the BBM Social

Platform (Opens Summer 2011)

– www.blackberrypartnersfund.com/challenge

2011 BlackBerry Developer Challenge

Page 34: Desarrollo con AIR para Playbook

• New - Six Special Recognition Awards1.Best B2C application developed for a customer by an

Agency or ISV2.Most useful enterprise application 3.Best website conversion using the BlackBerry

WebWorks platform4.Most creative implementation of Super App

characteristics5.Top Performers – Most Innovative use of BlackBerry

Payment Service and/or Advertising Service6.Academic – Most compelling application created by

student or faculty

2011 BlackBerry Developer Challenge

Page 35: Desarrollo con AIR para Playbook

BlackBerry Developer Conferences

Page 36: Desarrollo con AIR para Playbook

Thank You.

36