Beginning Android Flash Development - GTUG Edition

  • 2,427 views
Uploaded on

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

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,427
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
43
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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