Scaling API-first – The story of a global engineering organization
Flex mobile development
1. Android App
Development with Hero
and Burrito
var location: Geolocation = theRedspace;
Mo Farajmandi:: mo.farajmandi@theredspace.com
2. Overview
• Build a basic Flex Mobile app
• requirements : Hero + Burrito
• Types of Mobile Application
• Supported (i.e. Mobile Ready) Components
• View & Navigation
• Run on Emulator, or on Device
• How to use mx based components?
• How to handle orientation change: Portrait vs. Landscape
• Trigger Built in Phone features
• iPhone export via iPhone packager
5. View and Navigation
• Main Components of Interest:
• spark.components.View
• spark.components.ViewNavigator
• General interaction between the view and navigator via pushView,
and popView.
6. View
• Drives from Spark Group has two parts ActionBar and Main
View
• Displays an ActionBar containing:
• navigationContent,
• titleContent,
• actionContent
• Useful Events: viewActivate, creationComplete
• Useful Properties:
• overlayControls
• tabBarVisible
• actionBarVisible
7. ViewNavigator
• pushView, popView
• Passing Data Between Views
• pushView(ViewClassName,
data);
• returning data on popView()
by overriding
createReturnObject()
• actionBar Visibility Effect
• transitionEnabled
9. URI Handlers in Air
for Android
• navigateToURL(new URLRequest("tel:90244434"));
• navigateToURL(new URLRequest("sms:4085366000"));
• navigateToURL(new
URLRequest("mailto:mo.farajmandi@theredspace.com?subject=Question"));
• http://blogs.adobe.com/cantrell/archives/2010/11/uri-handlers-in-air-for-android-phone-calls-email-text-
messages-maps-and-urls.html
10. iPhone Export?!
• Download iPhone packager
• You may need to compile in command
line
• "${FLEX_HOME}/bin/mxmlc" -load-config "${FLEX_HOME}/frameworks/airmobile-
config.xml" -compiler.include-libraries+=libs -sp src -o bin-debug/FaceFun.swf
src/PlayerMobile.mxml
• Not usable on iPhone 3G, Ok, on iPhone4
12. Conclusion
• Very easy & FUN to play with
• Not everything will work right away, but
you can get most of your code running.
• Some components/utilities may need
tweaks but it’s usually minor.