Your SlideShare is downloading. ×
0
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Your First Adobe Flash Application for Android

7,838

Published on

@suzalex presentation from #andevcon. More information at http://developer.motorola.com

@suzalex presentation from #andevcon. More information at http://developer.motorola.com

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,838
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Suzanne AlexandraMotorola<br />Your First Flash Application for Android<br />For Android Developers<br />
  • 2. @suzalex<br />developer.motorola.com<br />#AnDevCon<br />Presentation Title Version 1.0 02.24.09<br />
  • 3. Where&apos;s the droid?<br />Hint: Café au lait<br />Presentation Title Version 1.0 02.24.09<br />
  • 4. Part 1<br />Why?<br />
  • 5. AIR on mobile devices<br />Adobe AIR for Mobile Devices<br />http://moto.ly/airmobile<br />
  • 6. Visually stunning · easy to build · Android Market · multiple platforms<br />
  • 7. The Flash universe<br />Runtimes<br />Adobe® AIR®<br />Adobe® Flash® Player<br />The Flash universe<br />Applications, content, and video<br />Tools<br />Framework<br />Services/Servers<br />Adobe Flash Platform Services<br />Adobe® Flash® CS5 Professional<br />Adobe® Flex®<br />Adobe Flash Media Server family<br />Adobe® LiveCycle® Data Services<br />Adobe® Flash® Builder™<br />
  • 8. Flash<br />Flex<br />UIs with components<br />Data-driven apps<br />Server-based apps<br />Enterprise apps<br />XML + ActionScript<br />Rich graphics<br />Animations with timeline <br />Video-based apps<br />Games<br />Presentation Title Version 1.0 02.24.09<br />
  • 9. Access device features<br />Multitouch and gesture<br />Accelerometer<br />Screen orientation<br />Mobile text input<br />Device capabilities discovery<br />Camera – image and video<br />Camera app and camera roll<br />Microphone<br />Geolocation<br />Network connectivity<br />Presentation Title Version 1.0 02.24.09<br />
  • 10. When you need Android SDK<br />Services<br />Background threads<br />Home screen widgets<br />Content providers<br />Front-facing camera<br />Intents<br />Accessing core apps<br />Broadcast receivers<br />Notifications<br />Status bar<br />Presentation Title Version 1.0 02.24.09<br />
  • 11. Page 7<br />Where&apos;s the droid?<br />Hint: Rhymes with peach<br />Presentation Title Version 1.0 02.24.09<br />
  • 12. AIR on which devices?<br />Presentation Title Version 1.0 02.24.09<br />
  • 13. When AIR is not on the device<br />Presentation Title Version 1.0 02.24.09<br />
  • 14. Part 2<br />How?<br />
  • 15. Adobe Flash Builder Burrito<br />Adobe Flash Professional CS5<br />Flash Extension for AIR<br />Design and development tool<br />moto.ly/getflashcs5<br />moto.ly/getext<br />Development tool<br />moto.ly/burrito<br />Presentation Title Version 1.0 02.24.09<br />
  • 16. AIR on the device<br />Download from Android Market<br />Or install Runtime.apk<br />Presentation Title Version 1.0 02.24.09<br />
  • 17. The ActionScript class reference<br />http://moto.ly/getasref<br />
  • 18. ActionScript and Java both …<br />Are object-oriented<br />Have packages, classes, and interfaces<br />Use single inheritance<br />Have a base Object class<br />Are strongly typed<br />Presentation Title Version 1.0 02.24.09<br />
  • 19. Comparing the syntax of Java <br />and ActionScript 3<br />http://moto.ly/asjava<br />But ActionScript has …<br />Dynamic classes<br />Get / set functions<br />No method overloading<br />No threads<br />Presentation Title Version 1.0 02.24.09<br />
  • 20. The stage<br />First, a few key concepts<br />Presentation Title Version 1.0 02.24.09<br />
  • 21. Declaring variables<br />Java<br />public int number;<br />public Object foo = <br /> new Object();<br />ActionScript<br />public var number:int;<br />public var foo:Object = new Object();<br />Presentation Title Version 1.0 02.24.09<br />
  • 22. Declaring methods<br />Java<br />public int add( int first, int second ) {<br /> int sum = first + second;<br /> return sum;<br /> }<br />ActionScript<br />public function add( one:Number, two:Number):Number{<br /> var f:Number = one;<br /> var s:Number = two;<br /> var sum:Number = f + s;<br /> return sum;<br />}<br />Presentation Title Version 1.0 02.24.09<br />
  • 23. DemoBuilding a first app<br />Hint: Oolong tea<br />Presentation Title Version 1.0 02.24.09<br />
  • 24. AndroidManifest settings in app.xml<br />&lt;android&gt; <br /> &lt;manifestAdditions&gt; <br /> &lt;![CDATA[ <br /> &lt;manifest&gt; <br />… your tags here …<br /> &lt;/manifest&gt; <br /> ]]&gt; <br /> &lt;/manifestAdditions&gt; <br />&lt;/android&gt;<br />Java<br />Presentation Title Version 1.0 02.24.09<br />
  • 25. Add permissions, for example<br />&lt;android&gt; <br /> &lt;manifestAdditions&gt; <br /> &lt;![CDATA[ <br /> &lt;manifest&gt; <br /> &lt;uses-permission<br /> android:name=&quot;android.permission.INTERNET&quot;/&gt;<br /> &lt;/manifest&gt; <br /> ]]&gt; <br /> &lt;/manifestAdditions&gt; <br />&lt;/android&gt;<br />Java<br />Presentation Title Version 1.0 02.24.09<br />
  • 26. DemoDebugging on the device<br />Hint: Tequilas, tacos<br />Presentation Title Version 1.0 02.24.09<br />
  • 27. Part 3<br />What about … ?<br />
  • 28. The activity lifecycle<br />It&apos;s managed for you!<br />Nothing to do<br />Presentation Title Version 1.0 02.24.09<br />
  • 29. The Back key<br />Back exits the app by default<br />You can access Back and define actions<br />Presentation Title Version 1.0 02.24.09<br />
  • 30. Using the Back key<br />private function onKeyDown(event:KeyboardEvent):void {<br /> if ( event.keyCode == Keyboard.BACK ) {<br /> event.preventDefault();<br /> // do something<br /> }<br />}<br />Java<br />Presentation Title Version 1.0 02.24.09<br />
  • 31. Detecting screen resolution<br />trace(&quot;screenResolutionX: &quot; + Capabilities.screenResolutionX);<br />trace(&quot;screenResolutionY: &quot; + Capabilities.screenResolutionY);<br />Java<br />On XOOM<br />screenResolutionX: 1280<br />screenResolutionY: 800<br />Presentation Title Version 1.0 02.24.09<br />
  • 32. Detecting supported gestures<br />import flash.ui.MultiTouch;<br />if (Multitouch.supportsGestureEvents == true) {<br /> trace(&quot;Supported gestures&quot; + Multitouch.supportedGestures );<br />}<br />Java<br />On XOOM<br />gestureZoom, gesturePan, gestureRotate, gestureTwoFingerTap, gestureSwipe<br />Presentation Title Version 1.0 02.24.09<br />
  • 33. Multitouch<br />Michael Chaize<br />www.RIAgora.com<br />Great resources<br />Games<br />Hemant Sharma<br />Crazy Gems<br />www.hsharma.com/tech<br />Games<br />Paul Trani<br />Doodle Galaxy Invaders<br />paultrani.com<br />Presentation Title Version 1.0 02.24.09<br />
  • 34. Okay, now …Where was the droid?<br />
  • 35. Questions?<br />@suzalex<br />@motodev<br />www.adobe.com/devnet/air.html<br />moto.ly/airmobileforum<br />moto.ly/joinmotodev<br />
  • 36. MOTOROLA MOBILITY DEVELOPER NETWORK<br />Detailed product specs<br />Practical advice, technical articles, and documentation<br />Expert support via forums<br />Community interaction via blogs, podcasts, and social media<br />Global news, events, and training <br />Web: developer.motorola.com<br />Twitter: @motodev<br />
  • 37. GET STARTED NOW!<br />Test Your Apps on the MOTODEV App Validatorhttp://moto.ly/appvalidator<br />Join the MOTODEV CommunityAsk questions, read our blogs, and networkhttp://moto.ly/joinmotodev<br />Join our live chat with technical experts at the MOTODEV Office Hours March 16 2pm PSTDetails at http://moto.ly/officehours<br />Twitter: @motodev<br />#andevcon<br />
  • 38. thank you<br />
  • 39. BSD LICENSE<br />Except when otherwise noted, sample source code is provided under the following terms.<br /> Copyright (c) 2011, Motorola Mobility, Inc. All  rights reserved.<br /> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<br /> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<br /> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<br /> Neither the name of the Motorola, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<br /> THIS  SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH  DAMAGE.<br />
  • 40. APACHE 2 LICENSE<br />Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.<br /> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.<br />

×