Upload
terry-ryan
View
1.983
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Going over AIR for Android and multiple screens for Motorola developers at XOOM event.
Citation preview
XOOM with Flash and AIR
Terry RyanDeveloper Evangelisthttp://terrenceryan.com@tpryan
Who are you?
Flash on Devices
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
Current Versions
Flash Player 10.3 Air 2.6
AIR for Devices
.apk
“Native Application”
• AIR for Device Applications are “Native”
• That means they can be put on app stores
• NOT that the UI components are native
We can use Flash to build “native applications”
A layer above Android? Isn’t that slow?
Comb Over Charlie
Why Flash on Devices
AIR is MultiScreen
Harness Creatives
Timeout
Deeper Dive
What can AIR do?
GEO APIs
• Geolocation.isSupported• GeolocationEvent.UPDATE• GeolocationEvent:
– altitude– heading– horizontalAccuracy– latitude– longitude– speed– timestamp– verticalAccuracy
Accelerometer APIs
• Accelerometer.isSupported• AccelerometerEvent.UPDATE• AccelerometerEvent:
– accelerationX– accelerationY– accelerationZ– timestamp
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
Remote Data
• Standard Flex Networking Libraries:– HTTPService– WebService– RemoteObject
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
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
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();
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
Tooling
Flash Tooling
Flash Professional• Designer centric• Timeline based • Traditional Flash
Tool
Flash Builder• Developer Centric• Code based• Eclipse Plugin
ActionScript
ActionScript
• Scripting Language for Flash
• Object Oriented• Event Based
Scripting Language
• Like JavaScript, PHP, ruby…• Allow for manipulation of
item in Flash’s world
var greet:TextField = new TextField();greet.text = "Hello World";this.addChild(greet);
Flash Builder 4
MXML and ActionScriptCode editing
Visual layoutand styling
Mobile debugging
What is Flash Builder
Demo
Boa Tarde
Flex for Mobile
Mobile Optimized Components
View Navigator
• The pattern for screens on devices
• Can define transitions between views
• Uses push/pop stack to move between views
Tab Navigator
• Tab through views• Just set up
multiple ViewNavigators with the firstView property
• Can’t use push/pop
Actionbar
• Provides easy access to important features
• Won’t scroll• Can be defined globally or for
each view
Demo
Flash Builder in Action
Philly ETE
Conqu
Design Considerations
!=
Apps that get it right
GMail
Market
Get Coding
Flash Tooling
Flash Professional
http://adobe.com/go/fl ashpro
Flash Builder
http://adobe.com/go/fl ashbuilder
Development Help
http://www.adobe.com/devnet/devices/android.html
Conclusions
Follow up?
• Feel free to contact me–[email protected]–http://terrenceryan.com–Twitter: @tpryan
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
MOTODEV App Summit
LIFE. POWERED.