Android Flash Development<br />An Introduction to Flash and AIR Development on Android<br />Oswald Campesato<br />Twitter:...
Flash and AIR on Android<br /><ul><li>Available on Android Phones Today
Works in the Browser
Limited Access to Device APIs
Runs on most smart phones (but not iPhone)</li></ul>Adobe Flash<br /><ul><li>AIR 2.5 released with Android Support
Deploys as an Android Market Application
Gives Full Access to Device APIs
Runs on most smart phones including Android and iPhone</li></ul>Adobe AIR<br />Latest Version: AIR 2.6<br />
Flash Tooling<br />
Flash Professional CS5<br />
Flash Capability Reporter<br />import flash.system.Capabilities;<br />import flash.ui.Multitouch;<br /> <br />capabilitySc...
Flash Professional CS5<br />
Flash Capability Reporter<br />
Android Devices<br />
Device Screen Characteristics<br />
Screen Resolution vs. Density<br />
Density in Flex Applications<br />
Density Explorer Application<br /><fx:Script><br />  <![CDATA[<br />    [Bindable]<br />    protected varapplicationDPI:St...
Author Density Settings<br />160ppi<br />240ppi<br />320ppi<br />
Flash/AIR Mobile APIs<br />Screen Orientation *<br />Multitouch *<br />Gestures *<br />Accelerometer<br />Camera<br />Came...
Screen Orientation<br />Stage Event Listener<br />stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,    <fun...
Screen Orientation Example<br />import flash.display.StageOrientation;<br />import flash.events.StageOrientationEvent;<br ...
Portrait/Landscape Switching<br />
Portrait/Landscape Switching<br />
Mulititouch<br />Gestures<br />Two Finger Tap<br />Pan<br />Zoom<br />Rotate<br />Swipe<br />Illustrations provided by Ges...
Gestures via addEventListener<br />public class MultitouchImage extends Image {<br />    public function MultitouchImage()...
Gestures via Events<br />protected function swipe<br />	(e:TransformGestureEvent):void {<br />        page = (page + e.off...
Android Scrapbook Example<br />
Touch Point API<br />
Snake Generator Sample<br />
Flex Mobile Views/Controls<br /><ul><li>ViewNavigatorApplication
Views
ViewNavigator
Splash Screen
Components:
Upcoming SlideShare
Loading in...5
×

Beginning Android Flash Development - GTUG Edition

2,497

Published on

Talk on Flash and Flex development for Android devices given at the Google Technology User Group (GTUG) in Silicon Valley.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,497
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Beginning Android Flash Development - GTUG Edition"

  1. 1. Android Flash Development<br />An Introduction to Flash and AIR Development on Android<br />Oswald Campesato<br />Twitter: @ocampesato<br />http://book2-web.com/<br />Stephen Chin<br />Twitter: @steveonjava<br />http://flash.steveonjava.com/<br />
  2. 2. Flash and AIR on Android<br /><ul><li>Available on Android Phones Today
  3. 3. Works in the Browser
  4. 4. Limited Access to Device APIs
  5. 5. Runs on most smart phones (but not iPhone)</li></ul>Adobe Flash<br /><ul><li>AIR 2.5 released with Android Support
  6. 6. Deploys as an Android Market Application
  7. 7. Gives Full Access to Device APIs
  8. 8. Runs on most smart phones including Android and iPhone</li></ul>Adobe AIR<br />Latest Version: AIR 2.6<br />
  9. 9. Flash Tooling<br />
  10. 10. Flash Professional CS5<br />
  11. 11. Flash Capability Reporter<br />import flash.system.Capabilities;<br />import flash.ui.Multitouch;<br /> <br />capabilityScroller.capabilities.text =<br /> "Manufacturer: " + Capabilities.manufacturer + "n" +<br /> "OS: " + Capabilities.os + "n" +<br /> "Pixel Aspect Ratio: " + Capabilities.pixelAspectRatio + "n" +<br /> "Player Type: " + Capabilities.playerType + "n" +<br /> "Screen Color: " + Capabilities.screenColor + "n" +<br /> "Screen DPI: " + Capabilities.screenDPI + "n" +<br /> "Screen Resolution: " + Capabilities.screenResolutionX + "x" + Capabilities.screenResolutionY + "n" +<br /> "Touch Screen Type: " + Capabilities.touchscreenType + "n" +<br /> "Version: " + Capabilities.version + "n" +<br /> "Supports Gesture Events: " + Multitouch.supportsGestureEvents + "n" +<br /> "Supports Touch Events: " + Multitouch.supportsTouchEvents + "n" +<br /> "Input Mode: " + Multitouch.inputMode + "n" +<br /> "Max Touch Points: " + Multitouch.maxTouchPoints + "n" +<br /> "Supported Gestures: " + Multitouch.supportedGestures;<br />
  12. 12. Flash Professional CS5<br />
  13. 13. Flash Capability Reporter<br />
  14. 14. Android Devices<br />
  15. 15. Device Screen Characteristics<br />
  16. 16. Screen Resolution vs. Density<br />
  17. 17. Density in Flex Applications<br />
  18. 18. Density Explorer Application<br /><fx:Script><br /> <![CDATA[<br /> [Bindable]<br /> protected varapplicationDPI:String;<br /> [Bindable]<br /> public vardpi:int;<br /> ]]><br /></fx:Script><br /><s:VGrouppaddingTop="20" paddingLeft="15" <br />paddingRight="15" paddingBottom="15"<br /> gap="20" width="100%" height="100%"><br /> <s:Label text="Author Density:"/><br /> <s:HGroup gap="15"><br /> <s:RadioButton id="ad160" content="160" <br /> click="applicationDPI = 160"/><br /> <s:RadioButton id="ad240" content="240" <br /> click="applicationDPI= 240"/><br /> <s:RadioButton id="ad320" content="320" <br /> click="applicationDPI = 320"/><br /> </s:HGroup><br /> <s:Label text="Device DPI: {dpi}"/><br /> <s:HSlider id="dpiSlider" minimum="130" maximum="320" <br /> value="@{dpi}" width="100%"/><br /></s:VGroup><br />
  19. 19. Author Density Settings<br />160ppi<br />240ppi<br />320ppi<br />
  20. 20. Flash/AIR Mobile APIs<br />Screen Orientation *<br />Multitouch *<br />Gestures *<br />Accelerometer<br />Camera<br />CameraRoll<br />GPS<br />Microphone<br />Audio<br />Video<br />REST<br />JSON/XML<br />ViewNavigator<br />CSS<br />Etc.<br />* APIs we will show examples of today<br />
  21. 21. Screen Orientation<br />Stage Event Listener<br />stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, <function callback>);<br />StageOrientation Values<br />DEFAULT<br />ROTATED_LEFT<br />ROTATED_RIGHT<br />UPSIDE_DOWN<br />UNKNOWN<br />
  22. 22. Screen Orientation Example<br />import flash.display.StageOrientation;<br />import flash.events.StageOrientationEvent;<br />stop();<br />stage.addEventListener(<br />StageOrientationEvent.ORIENTATION_CHANGE, onChanged);<br />function onChanged(event:StageOrientationEvent):void {<br /> play();<br />}<br />
  23. 23. Portrait/Landscape Switching<br />
  24. 24. Portrait/Landscape Switching<br />
  25. 25. Mulititouch<br />Gestures<br />Two Finger Tap<br />Pan<br />Zoom<br />Rotate<br />Swipe<br />Illustrations provided by Gestureworks (www.gestureworks.com)<br />
  26. 26. Gestures via addEventListener<br />public class MultitouchImage extends Image {<br /> public function MultitouchImage() {<br />addEventListener(TransformGestureEvent.GESTURE_ROTATE, <br />rotateListener);<br />addEventListener(TransformGestureEvent.GESTURE_ZOOM,<br />zoomListener);<br />Multitouch.inputMode = MultitouchInputMode.GESTURE;<br />}<br /> protected function rotateListener(e:TransformGestureEvent):void {<br /> rotation += e.rotation;<br />}<br /> protected function zoomListener(e:TransformGestureEvent):void {<br />scaleX *= e.scaleX;<br />scaleY *= e.scaleY;<br />}}}<br />
  27. 27. Gestures via Events<br />protected function swipe<br /> (e:TransformGestureEvent):void {<br /> page = (page + e.offsetX + <br />pages.numElements) % <br />pages.numElements;<br />updateVisibility();<br />}<br /> <s:VGroupgestureSwipe="swipe(event)”/><br />
  28. 28. Android Scrapbook Example<br />
  29. 29. Touch Point API<br />
  30. 30. Snake Generator Sample<br />
  31. 31. Flex Mobile Views/Controls<br /><ul><li>ViewNavigatorApplication
  32. 32. Views
  33. 33. ViewNavigator
  34. 34. Splash Screen
  35. 35. Components:
  36. 36. ActionBar
  37. 37. Text Components
  38. 38. List, Scroller, and Touch Gestures</li></ul>For more info see: http://opensource.adobe.com/wiki/display/flexsdk/Hero<br />
  39. 39. Future Device Support<br />Blackberry Playbook<br />Android Tablets<br />iPhone/iPad<br />Television<br />http://www.youtube.com/watch?v=zyJVNK7aSW4<br />
  40. 40. Blackberry Playbook Specs<br />“Enterprise Ready" Device<br />7" Screen (9.7mm Thick)<br />HTML5 and FULL Flash 10.1<br />Hardware Accelerated Video<br />Supports HDMI (TV output)<br />Displays PPT and Documents<br />Front and Rear Cameras<br />1 GHZ core and 1GB RAM <br />Q1/Q2 of 2011<br />
  41. 41. Other Tablet Flash Devices<br />Cisco Cius ("see us")<br />"enterprise ready" device <br />Samsung Galaxy Tab<br />"enterprise ready" device<br />7" screen<br />features: http://www.youtube.com/watch?v=v1PO3_iqbQ8 <br />Toshiba 100 Folio (Android)<br />http://www.youtube.com/watch?v=qfVurbT1ytA<br />
  42. 42. WP7 Based Tablets<br />Acer<br />Asus (Eee PC T101MT)<br />Cosmos<br />Dell<br />Fujitsu<br />Lenovo (Ideapad S10-3t)<br />Motion Computing (J3500)<br />Samsung (Gloria)<br />Toshiba (Libretto W100) <br />
  43. 43. Upcoming TV Flash Devices<br />Google TV<br />Open Source<br />Flash 10.1 Support<br />Limited Tests Conducted<br />View Web Apps<br />Partnership with Sony, Intel, Logitech<br />Adobe TV<br />http://tv.adobe.com/<br />http://www.youtube.com/watch?v=U_B7-wWnY0Y<br />"People of Lava" Android TV (Sweden):<br />First Android-based TV(?) <br />http://www.youtube.com/watch?v=NQEMkXJ1Hbg<br />
  44. 44. Google TV – Logitech Revue<br />Specs:<br />Atom CE4150 Processor<br />1GB RAM<br />HDMI port<br />Features<br />12 bundled applications<br />Local file media player<br />Search capabilities (local/web)<br />Bookmark capability<br />Limitations<br />no file download capability<br />no screenshot capability<br />
  45. 45. And An Android Car?<br />Android Car (China Only)<br />Made Available in April, 2010<br />$10,250 – $19,000 USD<br />Android 2.1<br />Features:<br />Real-time Traffic<br />Directions<br />Internet<br />On-line Chat<br />http://www.youtube.com/watch?v=76gTWZKSAI8<br />
  46. 46. Development Links<br />Android SDK <br />http://developer.android.com/sdk/index.html<br />AIR 2.5<br />http://labs.adobe.com/technologies/air2/android/<br />Flex Builder 4.5 (Burrito)<br />http://labs.adobe.com/technologies/flashbuilder_burrito/<br />Flex Catalyst 5.5 (Panini)<br />http://labs.adobe.com/technologies/flashcatalyst_panini/<br />Flex 4.5 SDK (Hero)<br />http://labs.adobe.com/technologies/flexsdk_hero/<br />iPhone Packager<br />http://labs.adobe.com/technologies/packagerforiphone/<br />
  47. 47. Blogs to Read<br />Stephen Chin<br />http://flash.steveonjava.com/<br />James Ward<br />http://www.jamesward.com/<br />Duane Nickull<br />http://technoracle.blogspot.com/<br />Christian Cantrell<br />http://blogs.adobe.com/cantrell/<br />Christophe Coenraets<br />http://coenraets.org/blog/<br />Serge Jespers<br />http://www.webkitchen.be/<br />Lee Brimelow (The Flash Blog)<br />http://blog.theflashblog.com/<br />Mark Doherty (FlashMobileBlog)<br />http://www.flashmobileblog.com/<br />
  48. 48. Pro Android Flash<br />Stephen Chin, Oswald Campesato, and Dean Iverson<br />Presentation will be posted at: http://flash.steveonjava.com/<br />Will Include:<br /><ul><li>UI Controls
  49. 49. Media Support
  50. 50. Mobile Flex APIs
  51. 51. Android Market Deployment
  52. 52. Extensive Examples</li></ul>Coming in Spring 2011<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×