Your SlideShare is downloading. ×
  • Like
Building apps for multiple devices
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Building apps for multiple devices


A session on using Flex and AIR to develop application that can run on IOS, Android,or PlayBook. A primer on getting at least close to the dream of one code base, multiple devices.

A session on using Flex and AIR to develop application that can run on IOS, Android,or PlayBook. A primer on getting at least close to the dream of one code base, multiple devices.

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


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Building Apps for Multiple Devices
    Terry Ryan
    Developer Evangelist
  • 2. Let me start a process here
  • 3. Poll
    How many have done native mobile?
    How many have done mobile AIR?
    How many have done mobile AIR with Flex?
    How many have done it for multiple platforms?
  • 4. You can do cross platform mobile development with Adobe AIR!!!
  • 5. Wooooooh!!!!!!
  • 6. We a wrote very good demo project. Actual mileage may vary.
  • 7. Noooooo!!!!!!
  • 8. Please, I beg you, button, stop appearing off-screen
  • 9. My goal: give you guys an idea of what you need to do to actually produce multi-screen apps
  • 10. Using one code base
  • 11. Should you do this?
  • 12. Content
    Flex with a little ActionScript only
  • 13. Designing for Multiple Devices
  • 14. Resolution and DPI
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. DPI FUBAR
  • 20. So how do we deal with this?
  • 21. Application DPI
    This is the DPI of the device you are targeting in development
    Allows for resizing to denser devices
  • 22. Application DPI
    3 Levels
  • 23. Media Queries
    CSS media queries allow you to target different DPI screens naturally
  • 24. Media Queries
    @media all and (application-dpi: 160)
    color: red;
    @mediaalland (application-dpi: 240)
    color: green;
  • 25. Media Query Options
  • 26. Personal Thought on OS Media Queries
    Don’t do itif you want to keep a unified code base
    Handle Density and screen size, but not OS
  • 27. Demo
    Application DPI and Media Queries in Flex
  • 28. Deeper Dive
    Narciso Jaramillo
    Deep Dive Into Multi Density & Multi Platform Application Development
  • 29. ActionScript Only
    Roll your own looking at:
    In development I’ve had issues with stage.stageWidth
  • 30. Demo
    Application Sizing in ActionScript
  • 31. Flash Builder Simulating
    In Design View
    At compile
    At compile
  • 32. !=
  • 33.
  • 34.
  • 35. Developing for Multiple Devices
  • 36. Don’t tweak for devices in code.
  • 37. If you can avoid it.
  • 38. But what about differences between UI controls IOS vs Android vsPlayBook
  • 39. It depends
  • 40. Configuring for Multiple Devices
  • 41. Application Descriptor
    You know that XML file
    Special settings for
  • 42. BlackBerry Descriptor
    BlackBerry Uses Application Descriptor and another file:
  • 43. BlackBerry Descriptor
    Allows you to make transparent apps and change preview icons.
    Transparent apps aren’t supported on other platforms
  • 44. Android Settings
    Custom URI
    Compatibility Filtering
    Install Location
  • 45. Android Permissions
  • 46. Android Custom URI
    Allow web pages or other android apps to launch your app from a url when the application is installed.
  • 47. Android Custom URI
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:scheme="myURI"/>
    URL would be:
    Where com.myApp.uniquename is the app id from your descriptor
  • 48. Android compatibility filtering
    Permissions assume all or nothing
    So if a feature is optional, you have to set it such or it won’t show up in store
    Important for Camera, Audio
  • 49. Camera Filtering
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="" android:required="false"/>
    <uses-feature android:name="" android:required="false"/>
    <uses-feature android:name="" android:required="false"/>
  • 50. Android Instal Location
    <manifest android:installLocation="preferExternal"/>
  • 51. IOS Settings
    Custom URI
    Compatibility Filtering
    Exit or Pause
  • 52. Models
    <string>1</string><!-- iPod/iPhone -->
    <string>2</string><!-- iPad -->
  • 53. Resolution
    High will allow you to draw single pixels on a high resolution screen, otherwise 1 pixel = 4 pixels
  • 54. Custom URI
    URL would be:
    If you set this to be the same as your application id you get compatibility with Android apps.
  • 55. IOS compatibility filtering
    Like Android it’s about discoverability and installation, not usage.
  • 56. Compatibility Filtering
  • 57. Exit or Pause
  • 58. Icon sizes
  • 59. AIR Versions
    There are some issues with AIR version and target
    BlackBerry - 2.5
    Android - 2.6
    IOS -2.6, or 2.0 or 2.7
  • 60. But that’s hard set
  • 61. Multiple Descriptors
  • 62. Publishing for Multiple Devices
  • 63. Flash Builder
    Publish to all platforms at the same time
  • 64. Compiling and Packaging
    Flash Builder uses features that are accessible through command line tools
    Often using those tools
    Therefore before it can be a feature in Flash Builder, has to be available in command line
  • 65. Flash Builder vs Command line
    Flash Builder will often lack ui that the command line exposes
    So it behooves you to learn command line
  • 66. Case in point
    Publishing AIR files compatible with Amazon Store
  • 67. Command line Compiling
    OS Scripts
    ANT (what I use)
  • 68. Tools
    AIR Packagers
    pfi (no longer needed)
  • 69. Process
    Compile SWF
    Gather External Resources
    Package for target device
  • 70. Compiling
    Requires MXMLC
    In ANT requires MXMLC Task
    Despite the name, works for non MXML apps.
    Doesn’t add the Flex Framework or anything either.
  • 71. Compiling via ANT
  • 72. Compiling via ANT
    On Desktops
  • 73. Demo
    Command Line Compiling
    with ANT
  • 74. Gathering Files
    Any assets used in application
    Application descriptor file
  • 75. Application Descriptor
    Most have a line:
    <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
    It won’t so you have to.
  • 76. Packaging for Android
    <argline="-target apk"/>
    <argline="-storetype pkcs12"/>
    <argline="-keystore ${cert}"/>
    <argline="-storepass ${cert.password}"/>
  • 77. Packaging for Android
    <argline="-target apk"/>
    Options include
  • Packaging for IOS
    <argline="-target ipa-ad-hoc "/>
    <argline="-storetype pkcs12 "/>
    <argline="-keystore ${ios.cert} "/>
    <argline="-storepass ${ios.certpass} "/>
    <argline="-provisioning-profile ${ios.provision} "/>
  • 80. Packaging for IOS
    <argline="-target ipa-ad-hoc "/>
    Options include
  • Packaging for BlackBerry
  • 84. Tons of options
  • 85. Packaging for BlackBerry
    -package - command to package
    -target (bar|bar-debug) - target format bar or bar-debug
    -connect <host> - host ip address for debugging
    -no-validation - turn off air and bar validation
    -list-files - list all files in the resulting package
    -env <var>=<value> - set an extra environment variable for the runtime
    -barVersion <version> - run in compatibility mode (set older version to be compatible with)
    -publisher - set the publisher (author) name
    -buildId - set the build id (4th segment of the version)
    -devMode - package in development mode
    <signing options> (part of packaging options):
    -signDev - command to sign with developer's certificate
    -keystore <store> - keystore file
    -storepass <pass> - store password for certificate store
    -signRim - command to sign by rim (requires internet connection)
    -cskpass <pass> - password to encrypt long-lived keys
    -installApp - command to install the package
    -launchApp - command to launch the app
    -device <deviceId> - set host name or IP address of the target
    -password <password> - device password
  • 86. Packaging for BlackBerry
    Installation and launching
  • 87. Demo
    Command Line Packaging
    with ANT
  • 88. Packaging for Amazon
    <argline="-target apk"/>
    <argline="-airDownloadURL ${amazon.url}"/>
    <argline="-storetype pkcs12"/>
    <argline="-keystore ${cert}"/>
    <argline="-storepass ${cert.password}"/>
  • 89. So should you do this?
  • 90. My Weasely answer:It Depends
  • 91. Can you wait for the next version of AIR?
  • 92. Is your app your competitive advantage, or a cost center?
  • 93. Is your audience spread out on devices?
  • 94. Studio Cloud
  • 95. Follow up?
    Feel free to contact me
    Twitter: @tpryan