This document discusses developing applications that can run across multiple mobile devices and platforms. It covers designing interfaces that adapt to different screen sizes and densities, using media queries and application DPI settings. It also discusses configuring applications to target Android, iOS, BlackBerry and other platforms through application descriptors and compiler settings. The document demonstrates packaging and deploying a single codebase to different devices using command line tools like ANT build scripts.
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!!!
45. Android Permissions ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION ACCESS_NETWORK_STATE ACCESS_WIFI_STATE CAMERA INTERNET READ_PHONE_STATE RECORD_AUDIO WAKE_LOCK WRITE_EXTERNAL_STORAGE
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 <activity> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter> <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"/> </intent-filter> </activity> URL would be: myURI://com.myApp.uniquename 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
54. Custom URI <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>myURI</string> </array> <key>CFBundleURLName</key> <string>com.myApp.uniquename</string> </dict> </array> URL would be: myURI://com.myApp.uniquename If you set this to be the same as your application id you get compatibility with Android apps.
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
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 <mxmlcfile="${projectFile}"output="${device.swf}"> <load-configfilename="${FLEX_HOME}/frameworks/airmobile-config.xml"/> <source-pathpath-element="${FLEX_HOME}/frameworks"/> <static-link-runtime-shared-libraries/> <compiler.library-pathdir="${FLEX_HOME}/frameworks"append="true"> <includename="libs/*"/> </compiler.library-path> </mxmlc>
72. Compiling via ANT <load-configfilename="${FLEX_HOME}/frameworks/airmobile-config.xml"/> On Desktops <load-configfilename="${FLEX_HOME}/frameworks/air-config.xml"/>
74. Gathering Files SWF 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.
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 <deployment_options>: -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