56
XOOM with Flash and AIR Terry Ryan Developer Evangelist http://terrenceryan.com @tpryan

Developing for Xoom with Flash and AIR

Embed Size (px)

DESCRIPTION

Going over AIR for Android and multiple screens for Motorola developers at XOOM event.

Citation preview

Page 1: Developing for Xoom with Flash and AIR

XOOM with Flash and AIR

Terry RyanDeveloper Evangelisthttp://terrenceryan.com@tpryan

Page 2: Developing for Xoom with Flash and AIR

Who are you?

Page 3: Developing for Xoom with Flash and AIR

Flash on Devices

Page 4: Developing for Xoom with Flash and AIR

Flash on Mobile

Flash Player 10.1 + • In-browser content• Games, video• Deploy as a SWF,

put on the web

Air 2.5 + • Mobile applications• Native APIs, extra

functionality• Package to target

individual devices

Page 5: Developing for Xoom with Flash and AIR

Current Versions

Flash Player 10.3 Air 2.6

Page 6: Developing for Xoom with Flash and AIR

AIR for Devices

.apk

Page 7: Developing for Xoom with Flash and AIR

“Native Application”

• AIR for Device Applications are “Native”

• That means they can be put on app stores

• NOT that the UI components are native

Page 8: Developing for Xoom with Flash and AIR

We can use Flash to build “native applications”

Page 9: Developing for Xoom with Flash and AIR

A layer above Android? Isn’t that slow?

Page 10: Developing for Xoom with Flash and AIR

Comb Over Charlie

Page 11: Developing for Xoom with Flash and AIR

Why Flash on Devices

Page 12: Developing for Xoom with Flash and AIR

AIR is MultiScreen

Page 13: Developing for Xoom with Flash and AIR

Harness Creatives

Page 14: Developing for Xoom with Flash and AIR

Timeout

Page 15: Developing for Xoom with Flash and AIR

Deeper Dive

Page 16: Developing for Xoom with Flash and AIR

What can AIR do?

Page 17: Developing for Xoom with Flash and AIR

GEO APIs

• Geolocation.isSupported• GeolocationEvent.UPDATE• GeolocationEvent:

– altitude– heading– horizontalAccuracy– latitude– longitude– speed– timestamp– verticalAccuracy

Page 18: Developing for Xoom with Flash and AIR

Accelerometer APIs

• Accelerometer.isSupported• AccelerometerEvent.UPDATE• AccelerometerEvent:

– accelerationX– accelerationY– accelerationZ– timestamp

Page 19: Developing for Xoom with Flash and AIR

Multi-Touch APIs

• Gesture OR Multitouch --- Multitouch.inputMode

MultitouchInputMode.GESTURE

TransformGestureEvent

GESTURE_PAN

GESTURE_ROTATE

GESTURE_SWIPE

GESTURE_ZOOM

GestureEvent.GESTURE_TWO_FINGER_TAP

PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP

MultitouchInputMode.TOUCH_POINT

TouchEvent

TOUCH_BEGIN

TOUCH_END

TOUCH_MOVE

TOUCH_OUT

TOUCH_OVER

TOUCH_ROLL_OUT

TOUCH_ROLL_OVER

TOUCH_TAP

Page 20: Developing for Xoom with Flash and AIR

Remote Data

• Standard Flex Networking Libraries:– HTTPService– WebService– RemoteObject

Page 21: Developing for Xoom with Flash and AIR

Camera Access

• Camera - Raw camera feed

• CameraUI - Nat ive Camera App

var cameraUI:CameraUI = new CameraUI();cameraUI.launch(MediaType.IMAGE);

• CameraRol l - Choose photos f rom the device 's camera ro l l

var cameraRoll:CameraRoll = new CameraRoll();cameraRoll.browseForImage();cameraRoll.addBitmapData(bd);

21

Page 22: Developing for Xoom with Flash and AIR

Native App Integration

• Open Email, Browser, Maps, Phone, or SMS– navigateToURL(new URLRequest('mailto:[email protected]'));

– navigateToURL(new URLRequest('http://www.jamesward.com'));

– navigateToURL(new URLRequest('http://maps.google.com/'));

– navigateToURL(new URLRequest('tel:1234567890'));

– navigateToURL(new URLRequest('sms:1234567890')); 22

Page 23: Developing for Xoom with Flash and AIR

Local DB APIs

• SQLite

• SQLConnection– Sync and/or Async connect ions

• SQLStatement– Prepared Statements :

var stmt:SQLStatement = new SQLStatement();stmt.sqlConnection = FlexGlobals.topLevelApplication['sqlConnection'];stmt.text = "INSERT into giberish values(:giberish)";stmt.parameters[":giberish"] = g.text;stmt.execute();

Page 24: Developing for Xoom with Flash and AIR

StageWebView

• WebStageView. isSupported

var swv:StageWebView = new StageWebView();swv.viewPort = new Rectangle(0, stage.height - height, width, height);swv.stage = stage;swv.loadURL("http://www.jamesward.com");

24

Page 25: Developing for Xoom with Flash and AIR

Tooling

Page 26: Developing for Xoom with Flash and AIR

Flash Tooling

Flash Professional• Designer centric• Timeline based • Traditional Flash

Tool

Flash Builder• Developer Centric• Code based• Eclipse Plugin

Page 27: Developing for Xoom with Flash and AIR

ActionScript

Page 28: Developing for Xoom with Flash and AIR

ActionScript

• Scripting Language for Flash

• Object Oriented• Event Based

Page 29: Developing for Xoom with Flash and AIR

Scripting Language

• Like JavaScript, PHP, ruby…• Allow for manipulation of

item in Flash’s world

Page 30: Developing for Xoom with Flash and AIR

var greet:TextField = new TextField();greet.text = "Hello World";this.addChild(greet);

Page 31: Developing for Xoom with Flash and AIR

Flash Builder 4

Page 32: Developing for Xoom with Flash and AIR

MXML and ActionScriptCode editing

Visual layoutand styling

Mobile debugging

What is Flash Builder

Page 33: Developing for Xoom with Flash and AIR

Demo

Boa Tarde

Page 34: Developing for Xoom with Flash and AIR

Flex for Mobile

Page 35: Developing for Xoom with Flash and AIR

Mobile Optimized Components

Page 36: Developing for Xoom with Flash and AIR

View Navigator

• The pattern for screens on devices

• Can define transitions between views

• Uses push/pop stack to move between views

Page 37: Developing for Xoom with Flash and AIR

Tab Navigator

• Tab through views• Just set up

multiple ViewNavigators with the firstView property

• Can’t use push/pop

Page 38: Developing for Xoom with Flash and AIR

Actionbar

• Provides easy access to important features

• Won’t scroll• Can be defined globally or for

each view

Page 39: Developing for Xoom with Flash and AIR

Demo

Flash Builder in Action

Page 40: Developing for Xoom with Flash and AIR

Philly ETE

Page 41: Developing for Xoom with Flash and AIR

Conqu

Page 42: Developing for Xoom with Flash and AIR

Design Considerations

Page 43: Developing for Xoom with Flash and AIR

!=

Page 44: Developing for Xoom with Flash and AIR
Page 45: Developing for Xoom with Flash and AIR
Page 46: Developing for Xoom with Flash and AIR

Apps that get it right

Page 47: Developing for Xoom with Flash and AIR

GMail

Page 48: Developing for Xoom with Flash and AIR

Email

Page 49: Developing for Xoom with Flash and AIR

Market

Page 50: Developing for Xoom with Flash and AIR

Get Coding

Page 51: Developing for Xoom with Flash and AIR

Flash Tooling

Flash Professional

http://adobe.com/go/fl ashpro

Flash Builder

http://adobe.com/go/fl ashbuilder

Page 52: Developing for Xoom with Flash and AIR

Development Help

http://www.adobe.com/devnet/devices/android.html

Page 53: Developing for Xoom with Flash and AIR

Conclusions

Page 54: Developing for Xoom with Flash and AIR

Follow up?

• Feel free to contact me–[email protected]–http://terrenceryan.com–Twitter: @tpryan

Page 55: Developing for Xoom with Flash and AIR

MOTODEV App Summit

GET STARTED NOW!

• Download MOTODEV Studio and the Android 3.1 SDK

• Test your app with the MOTODEV App Validator

• “Tell Us” about your application

• Join our online office hours, Thursday June 2, 2pm

• Leverage other MOTODEV resources– Ask questions in our discussion boards– Follow MOTODEV on Twitter @motodevbr

• Join us downstairs for networking, cocktails, and a chance to win a XOOM or ATRIX

Page 56: Developing for Xoom with Flash and AIR

MOTODEV App Summit

LIFE. POWERED.