15. Data based on respective products published technical specifications Pixels Per Inch (PPI)
16. AIR for Android Overview GeoLocation Accelerometer Camera Multitouch / Gesture Support Screen Orientation Microphone GPU Acceleration SQLiteDB StageWebView No Native Widgets No Multiple Camera Support No Access to Contacts Limited SMS Support
17.
18. ADB – Android Device Debugger installs apps on your device
19. DDMS - Dalvik Debug Monitor for desktop simulation.
26. Geolocation var geo: Geolocation; if (Geolocation.isSupported) { geo = new Geolocation(); geo.addEventListener(GeolocationEvent.UPDATE, updateHandler); geo.setRequestedUpdateInterval(10000);} else { log.text = "Geolocation feature not supported"; }
27. Hardware Keys stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true);function onKeyDown(event:KeyboardEvent):void { //Back Key if (event.keyCode == 94) { event.preventDefault(); // to kill event from running default behavior //do your own back stuff } //Menu Key if (event.keyCode == 95) { event.preventDefault(); // to kill event from running default behavior //do your own back stuff }}
28. Orientation stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; function setPosition():void { vidHolder.x = stageWidth/2 - vidHolder.width/2; vidHolder.y = stageHeight/2 - vidHolder.height/2; //If the layout is vertical if (stage.stageWidth < stage.stageHeight) { //Adjust graphics } } setPosition(); stage.addEventListener(Event.RESIZE, resizeLayout); function resizeLayout(e:Event):void { setPosition(); }
41. Graphics Consider bitmaps over vectors Keep bitmaps as small as possible Minimize number of vectors Test your animations with different qualities of Stage Avoid, if possible: Filters Blend modes Transparency Perspective distortion
42. GPU Accleration Set rendering mode to GPU Make sure cacheAsBitmap is set to true on your DisplayObject like this:square.cacheAsBitmap = true;
43. GPU Accleration Make sure to assign a Matrix to the cacheAsBitmapMatrix property on your DisplayObject like this:square.cacheAsBitmapMatrix = new Matrix(); http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.html
49. Display Objects Use the appropriate type of display object Objects that aren’t interactive, use Shape(); trace(getSize(new Shape())); // output: 216 Interactive but no timeline? Use Sprite(); trace(getSize(newSprite())); // output: 396 Need animation? Use Movieclip(); trace(getSize(newMovieClip())); // output: 416
50. Freeing Movieclips Alpha? RemoveChild? Visible? Even when removed from the display list, the movie clip still dispatches the Event.ENTER_FRAME event. runningBoy.addEventListener(Event.REMOVED_FROM_STAGE, deactivate); function deactivate(e:Event):void { e.currentTarget.removeEventListener(Event.ENTER_FRAME, handleMovement); e.currentTarget.stop(); }
51. Flex for Mobile - HERO http://labs.adobe.com/technologies/flexsdk_hero/
52. Hero in a Nutshell: Mobile Application Development Allow developers to create a single mobile project that will run on multiple mobile environments UI components supporting touchscreen interaction Application framework fitted with common mobile UI patterns Interactive performance tuned for mobile devices
53. Resources Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR, data integration, and a variety of third-party components, effects, skins, and more. https://market.android.com/details?id=air.adobe.flex.TourDeMobileFlex