4. Flex Support for Screen Metaphor Application First Screen Second Screen
5. Flex Mobile Components - ViewNavigator Using Flex’s s:MobileApplication or s:TabbedMobileApplication you get screen management for free navigator.push(NewScreen, data) - add new screen navigator.popView() - go to previous screen navigator.popToFirstView() - go to first view navigator.activeView - retrieve active view
6. Action Bar Navigation / Title / Action Hide the bar actionBarVisible = false Overlay the bar overlayControls = false <s:navigationContent> <s:Button label="Home"/> </s:navigationContent> <s:titleContent> <s:TextInput prompt="search" width="100%"/> </s:titleContent> <s:actionContent> <s:Button label="Go"/> </s:actionContent>
7. View Lifecycle ? View Data Another View Destroyed Created Created Destroyed Created Destroyed data = yourData; destructionPolicy =”none"
9. Camera Access Access to Camera Roll Access to Camera Native app (for video and photo) cameraUI = new CameraUI(); cameraUI.addEventListener(MediaEvent.COMPLETE, onCameraUIComplete); cameraUI.launch(MediaType.IMAGE);//photo //cameraUI.launch(MediaType.VIDEO);//video private function onCameraUIComplete(e:MediaEvent):void { varmediaPromise:MediaPromise = e.data; // do something with the image: mediaPromise.file.url; }
10. Microphone Access if (Microphone.isSupported) { mic= Microphone.getMicrophone(); soundBytes = new ByteArray(); mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler); } private function micSampleDataHandler(event:SampleDataEvent):void { while (event.data.bytesAvailable) { varsample:Number = event.data.readFloat(); soundBytes.writeFloat(sample); } }
11. Storing Data AIR has support for SQLite. You can create new databases/tables, read/write records You can write files to device storage
12. Thank You! Download tutorial and projects for mobile development: http://corlan.org/downloads/dt/mobile.zip I will upload the slides to my blog today. http://corlan.org http://twitter.com/mcorlan mcorlan@adobe.com
15. The Flash Platform Applications, Content and Video Tools to Design and Develop Clients Servers Framework Services Adobe® Flash® Builder™ Adobe® Flash® Media Server Family Adobe® Flash® CS5 Professional Adobe® Flex ® Adobe® Flash® Platform Services Adobe® AIR® “Burrito” “Hero” 2.6 Adobe® Flash® Catalyst™ Adobe® LiveCycle® Data Services Adobe® LiveCycle® Collaboration Service Adobe® Flash® Player “Panini” 10.2 Integrating withthe Flash Platform ColdFusion Builder Creative Suite 5
Notas do Editor
I’ve been working for Adobe for the past 7 years. And in the last tree years I’ve been working as a developer evangelist focused on Flex, Adobe AIR
Building Twitter ClientDiscuss new project wizard with different options, application permissionsUsing DCDDiscus Action BarDiscuss screen metaphorDiscuss view live cycle – using data to store the dataTesting the app in the simulator and deviceDiscuss support for device orientation changesDiscuss packaging supporShow Mobile-1 project to discuss phone/sms/mail/web integrationShow samples for camera and mic access
Show Mobile-1 project to discuss phone/sms/mail/web integration