12
Android App Development with Hero and Burrito var location: Geolocation = theRedspace; Mo Farajmandi:: [email protected]

Flex mobile development

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Flex mobile development

Android App Development with Hero and Burrito

var location: Geolocation = theRedspace;Mo Farajmandi::

[email protected]

Page 2: Flex mobile development

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

Page 3: Flex mobile development

Types of Flex Mobile Application

Page 4: Flex mobile development

Mobile Ready Components

Page 5: Flex mobile development

View and Navigation

• Main Components of Interest:

• spark.components.View

• spark.components.ViewNavigator

• General interaction between the view and navigator via pushView, and popView.

Page 6: Flex mobile development

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

Page 7: Flex mobile development

ViewNavigator•pushView, popView

•Passing Data Between Views

•pushView(ViewClassName, data);

•returning data on popView() by overriding createReturnObject()

•actionBar Visibility Effect

• transitionEnabled

Page 8: Flex mobile development

Orientation Change

• FlexGlobals.topLevelApplication.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged);

• Use States to change view

Page 9: Flex mobile development

URI Handlers in Air for Android

• navigateToURL(new URLRequest("tel:90244434"));

• navigateToURL(new URLRequest("sms:4085366000"));

• navigateToURL(new URLRequest("mailto:[email protected]?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

Page 10: Flex mobile development

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

Page 11: Flex mobile development

Burrito Code Productivity

•Code generation (also existed in Flex 4)

•Code Templates + Ctrl+1

Page 12: Flex mobile development

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.