Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

MOTOROLA XOOM Meet-up March 1st

Chargement dans…3

Consultez-les par la suite

1 sur 69 Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)


Similaire à MOTOROLA XOOM Meet-up March 1st (20)

Plus par Motorola Mobility - MOTODEV (20)


Plus récents (20)

MOTOROLA XOOM Meet-up March 1st

  1. 1. MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2011 Motorola Mobility, Inc. All rights reserved. MOTOROLA XOOM MEET-UP March 1, 2011
  2. 2. MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2011 Motorola Mobility, Inc. All rights reserved. Christy Wyatt Corporate VP – Software & Services Product Management
  3. 3. 27 Motorola Android Models 705 Launches Around the Globe Selling in 98 Countries
  4. 4. Android Is #3 in the US…
  5. 5. … But The Rate of Acceleration Has Overtaken Apple
  6. 6. Convergence Is Creating A More Mobile, Connected and Social Society
  8. 8. Thriving Together in a Converged World
  9. 9. AGENDA <ul><li>Android and Motorola Market Opportunity </li></ul><ul><li>MOTOROLA XOOM Demonstration </li></ul><ul><li>Designing Apps for the MOTOROLA XOOM </li></ul><ul><li>Panel: Development Experiences with MOTOROLA XOOM </li></ul><ul><li>Partnering with MOTODEV </li></ul><ul><li>Wrap-up and Device Giveaway </li></ul>
  10. 10. MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2011 Motorola Mobility, Inc. All rights reserved. Lori Fraleigh Director, Developer Platforms, Tools, and Technical Services ANDROID AND THE MOTOROLA OPPORTUNITY
  11. 11. AGENDA <ul><li>Android and Motorola Market Opportunity </li></ul><ul><li>MOTOROLA XOOM Demonstration </li></ul><ul><li>Designing Apps for the MOTOROLA XOOM </li></ul><ul><li>Panel: Development Experiences with MOTOROLA XOOM </li></ul><ul><li>Partnering with MOTODEV </li></ul><ul><li>Wrap-up and Device Giveaway </li></ul>
  12. 13. OUR STRATEGY <ul><li>Only company that is “All-in” with Android </li></ul><ul><ul><li>1st Android Éclair device (original DROID) </li></ul></ul><ul><ul><li>1st Android Honeycomb device (MOTOROLA XOOM) </li></ul></ul><ul><ul><li>Co-located in Silicon Valley + co-development at Google HQ </li></ul></ul><ul><li>Investing and innovating in Android more than anyone else </li></ul><ul><ul><li>1st Android business device (DROID PRO) </li></ul></ul><ul><ul><li>Largest open source contribution to Android outside of Google </li></ul></ul><ul><li>Commitment to full, rich web experience on mobile </li></ul><ul><ul><li>1 st device to preload Flash 10.1 (DROID 2) </li></ul></ul><ul><ul><li>HTML5 support </li></ul></ul><ul><li>Well positioned to take advantage of convergence of media/mobile </li></ul><ul><ul><li>Deep expertise in end-to-end video services </li></ul></ul><ul><ul><li>Developing next generation of converged devices (MOTOROLA ATRIX) </li></ul></ul>
  13. 14. ANDROID MOMENTUM WORLDWIDE SMARTPHONE SALES BY OS 2009 Market Share 14.4% 3.9% 2010 Market Share 15.7% 22.7% Source: Gartner Research, Feb 2011
  14. 15. ANDROID TOPS IPHONE IN U.S. MOBILE WEB TRAFFIC Q4'09 Q2'10 Q4'10 0% 100% 31 17 13 21 25 21 8 5 28 34 30 13 5 8 26 Source: AdMob Mobile Metrics Report, December 2010 Windows Mobile/Phone 7 OS Symbian OS Apple iOS/iPhone OS Android/Google OS Linux OS Palm/WebOS BlackBerry OS Meego/Maemo Others
  15. 16. REVENUE POTENTIAL KEEPS CLIMBING <ul><ul><li>Mobile App Stores Revenue Opportunity Worldwide 2008–2013 ($B) </li></ul></ul>Source: Gartner (December 2009) End-user spending Advertising revenue <ul><ul><li>30 </li></ul></ul><ul><ul><li>25 </li></ul></ul><ul><ul><li>20 </li></ul></ul><ul><ul><li>15 </li></ul></ul><ul><ul><li>10 </li></ul></ul><ul><ul><li>5 </li></ul></ul><ul><ul><li>0 </li></ul></ul><ul><ul><li>$35 </li></ul></ul>2008 2009 2010 2011 2012 2013
  16. 17. MOBILE IS THE INTERNET <ul><ul><li>2000 </li></ul></ul><ul><ul><li>1600 </li></ul></ul><ul><ul><li>1200 </li></ul></ul><ul><ul><li>800 </li></ul></ul><ul><ul><li>400 </li></ul></ul><ul><ul><li>0 </li></ul></ul>Source: Morgan Stanley Research Desktop Internet Users Mobile Internet Users 2007E 2010E 2015E <ul><ul><li>Mobile Users > Desktop Internet Users Within 5 Years (MM) </li></ul></ul>
  17. 18. HUGE MARKET SURGE PREDICTED FOR TABLETS BY 2015 <ul><ul><li>Global Tablet Shipments Will Rise From 19.7 Million in 2010 to 242 Million in 2015 </li></ul></ul>iPad Other Media Tablets <ul><ul><li>250,000 </li></ul></ul><ul><ul><li>200,000 </li></ul></ul><ul><ul><li>150,000 </li></ul></ul><ul><ul><li>100,000 </li></ul></ul><ul><ul><li>50,000 </li></ul></ul><ul><ul><li>0 </li></ul></ul><ul><ul><li>$300,000 </li></ul></ul>2010 2011 2012 2013 2015 2014 PC-Type Tablets Source: HIS iSuppli Market Research, February 2011
  18. 19. MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2011 Motorola Mobility, Inc. All rights reserved. Anna Schaller, Peter van der Linden Android Technology Evangelists DESIGNING APPS FOR THE MOTOROLA XOOM
  19. 20. INTRODUCING THE MOTOROLA XOOM <ul><li>Screen : 10.1” diagonal (xlarge), WXGA (1280 x 800), 160 dpi </li></ul><ul><li>Memory : 32 GB flash storage </li></ul><ul><li>Processor : nVidia Tegra 2 dual core </li></ul><ul><li>Sensors : accelerometer, barometer, gyroscope, compass, ambient light, GPS, no proximity or vibration, 4-way rotation </li></ul><ul><li>Connectivity : 802.11 a/b/g/n, Bluetooth, HDMI </li></ul><ul><li>Camera : 2mp fixed focus front / 5mp auto focus rear </li></ul><ul><li>Media : 720p HD video recording, 1080p HD playback </li></ul><ul><li>External storage : 32 GB SD card post-launch </li></ul><ul><li>Platform : Android 3.0 (Honeycomb) </li></ul><ul><li>App Environments: Adobe AIR 2.6, Android, NDK, (Flash 10.1 coming) </li></ul><ul><li>Lots and lots of software changes…….. </li></ul>
  20. 21. WHERE DID EVERYTHING GO? Status bar Menu Key Home Key Back Button Bonus Button (usually search) Volume Keys (up/down) Power Button
  21. 22. INTERACTING WITH THE TABLET Volume Keys (up/down) Power Button
  22. 23. INTERACTING WITH THE TABLET (CONT) System Bar Not a menu button
  23. 24. APPLICATION UI DESIGN CHANGES <ul><li>Holographic Theme </li></ul><ul><li>System Bar Dimming </li></ul><ul><li>Action bar </li></ul><ul><li>Fragments </li></ul><ul><li>New widgets </li></ul><ul><li>Updated Notifications </li></ul><ul><li>System Clipboard </li></ul><ul><li>Drag-and-drop </li></ul>
  24. 25. HOLOGRAPHIC THEME <ul><li>Inherited by all apps built against Android 3.0 </li></ul><ul><ul><li>minSdkVersion or targetSdkVersion = 11 * and * enable hardware acceleration ( android:hardwareAccelerated=“true” ) </li></ul></ul><ul><ul><li>If SDK version <= 9 then your application uses the widget designs from Android 2.3 and does not inherit the holographic theme </li></ul></ul><ul><li>Two versions exist </li></ul><ul><ul><li>Default dark background with white letters @android:style/Theme.Holo </li></ul></ul><ul><ul><li>Inversed holographic white with dark letters @android:style/Theme.Holo.Light </li></ul></ul>
  25. 26. DIMMING THE SYSTEM BAR <ul><li>Lights out mode </li></ul><ul><ul><li>Dims the system bar by replacing the icons with holographic “dots” (system bar is not removed) </li></ul></ul><ul><li> View v = findViewById(R.id. view_id); </li></ul><ul><li>v.setSystemUiVisibility( View. STATUS_BAR_HIDDEN ); </li></ul>
  26. 27. ACTION BAR - SIMPLE <ul><li>Replaces traditional title bar at top of app </li></ul><ul><li>Application Icon with title </li></ul><ul><li>Overflow menu </li></ul><ul><ul><li>Creating a menu has not changed </li></ul></ul><ul><ul><li>public boolean onCreateOptionsMenu(Menu menu) {…} </li></ul></ul><ul><ul><li>public boolean onOptionsItemSelected(MenuItem item) { </li></ul></ul><ul><ul><li>case R.id.menu_item …} </li></ul></ul><ul><ul><li>/res/menu/ menu_definitions.xml </li></ul></ul>
  27. 28. ACTION BAR – TABBED WITH ACTION ITEMS <ul><li>Application Icon can be made actionable </li></ul><ul><li>Tabbed interface on Action Bar </li></ul><ul><li>Individual action items rather than listed on overflow menu </li></ul><ul><ul><li>With or without text; with or without icon </li></ul></ul><ul><li>See android.app.actionbar </li></ul>“ Actionable” Icon Tabs Action Items
  28. 29. GOING FULL SCREEN – REMOVING THE ACTION BAR <ul><li>You can hide the action bar *however* your application loses access to your menu </li></ul><ul><li><activity android:theme= &quot;@android:style/Theme.NoTitleBar&quot; > </li></ul><ul><li>Another way to hide action bar is programmatically then allow user to toggle </li></ul><ul><li>A ctionBar bar = getActionBar(); </li></ul><ul><li>if (bar != null) { </li></ul><ul><li>if (bar. isShowing() ) bar. hide() ; </li></ul><ul><li> else bar. show() ; </li></ul><ul><li>} </li></ul>
  29. 30. MENUS <ul><li>To support forward compatibility added soft menu button along system bar </li></ul><ul><ul><li>minSdkVersion and targetSdkVersion < 11 </li></ul></ul>
  30. 31. FRAGMENTS <ul><li>Allows an application to be divided into subcomponents that can be individually managed and combined in various ways, such as creating a multi-pane UI. </li></ul>
  31. 32. FRAGMENTS (CONT) <ul><li>A fragment must always be embedded in an Activity </li></ul>List Fragment Fragment Activity
  32. 33. FRAGMENTS (BASE FRAGMENT) <ul><li>Create class that extends Fragment </li></ul><ul><li>Displays content similar to an Activity (images, text, application widgets) </li></ul><ul><li>Can be attached to another fragment or tab </li></ul><ul><li>Can add items to the Activity’s overflow menu (action bar) </li></ul><ul><li>Does not have to be visible (can operate behind the scenes) </li></ul><ul><li>If it is visible will require it’s own layout file </li></ul>(Base) Fragment
  33. 34. FRAGMENTS (ADDING TO ACTIVITY) XOOM_hc_app /res/layout/main.xml (List) Fragment Activity layout (Content) Fragment with embedded image PictureList.java ContentFragment.java
  34. 35. FRAGMENTS (CONT) <ul><li>How-to information in 3.0 Developer Guide on Fragments </li></ul><ul><li>See 3.0 Reference for APIs </li></ul><ul><ul><li>android.app.Fragment </li></ul></ul><ul><ul><li>android.app.ListFragment </li></ul></ul><ul><ul><ul><li>Displays a list similar to ListActivity </li></ul></ul></ul><ul><ul><li>android.app.DialogFragment </li></ul></ul><ul><ul><ul><li>Displays a floating dialog </li></ul></ul></ul><ul><ul><li>android.app.FragmentManager </li></ul></ul><ul><ul><ul><li>Interface for interacting with the fragment ( findFragmentById ) </li></ul></ul></ul><ul><ul><li>android.app.FragmentTransaction </li></ul></ul><ul><ul><ul><li>APIs for fragment operations (add, remove, replace, hide, show) </li></ul></ul></ul><ul><li>The Android 3.0 Fragments API blog post with more detail on what’s coming </li></ul>
  35. 36. NEW VIEWS <ul><li>Application Widgets </li></ul><ul><ul><li>PopupMenu ( android.widget.PopupMenu ) </li></ul></ul><ul><ul><ul><li>Menu is attached to a view (button for instance) </li></ul></ul></ul><ul><li>Home Screen Widgets </li></ul><ul><ul><li>StackView ( android.widget.StackView ) </li></ul></ul><ul><ul><ul><li>A view that displays its children in a 3D stack and allows users to discretely swipe through the children. </li></ul></ul></ul><ul><li>Rich Notifications ( android.app.Notification.Builder ) </li></ul><ul><ul><li>build notification layouts </li></ul></ul>
  36. 37. WORKING EXAMPLE <ul><li>Honeycomb Gallery in SDK samples showcases….. </li></ul><ul><ul><li>Action Bar with tabbed interface, action item menu, and overflow menu </li></ul></ul><ul><ul><li>FragmentList and fragment in portrait and landscape </li></ul></ul><ul><ul><li>New theme </li></ul></ul><ul><ul><li>Drag and drop </li></ul></ul><ul><ul><li>Animation </li></ul></ul><ul><ul><li>Hide/Show </li></ul></ul><ul><ul><li>Action Bar </li></ul></ul><ul><ul><li>Lights Out </li></ul></ul><ul><ul><li>Mode </li></ul></ul>
  37. 38. GRAPHICS <ul><ul><li>Hardware acceleration for 2D Graphics </li></ul></ul><ul><ul><li>New animation framework </li></ul></ul><ul><ul><li>nVidia compression </li></ul></ul><ul><ul><li>Renderscript </li></ul></ul>
  38. 39. HARDWARE ACCELERATION FOR 2D GRAPHICS Page Version 1.0 <ul><ul><li>a new hardware-accelerated OpenGL renderer </li></ul></ul><ul><ul><li>performance boost to many common graphics operations </li></ul></ul><ul><ul><li>most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and </li></ul></ul><ul><ul><li>you control how hardware-acceleration is applied, at every level, </li></ul></ul><ul><ul><li>enable it globally in an application, </li></ul></ul><ul><ul><li>or enable it only for specific Activities or Views </li></ul></ul>
  39. 40. HARDWARE ACCELERATION FOR 2D GRAPHICS <ul><ul><li>Apply for entire application or individual activity by setting appropriate node in manifest </li></ul></ul><ul><ul><ul><li>android:hardwareAccelerated=“true” </li></ul></ul></ul><ul><ul><li>Apply in code on an activity and/or window through WindowManager.LayoutParams </li></ul></ul><ul><li>Window win = getWindow(); </li></ul><ul><li>win.setFlags </li></ul><ul><li>(WindowManager.LayoutParams. FLAG_HARDWARE_ACCELERATED, mask ); </li></ul><ul><ul><li>Test to see if canvas is hw-accelerated with isHardwareAcclerated() </li></ul></ul>
  40. 41. ANIMATION FRAMEWORKS <ul><li>Now, two animation frameworks you can choose from: </li></ul><ul><ul><li>View animations (older android.view.animation ) </li></ul></ul><ul><ul><ul><li>Tween animations </li></ul></ul></ul><ul><ul><ul><ul><li>Performs a series of simple transformations on the contents of a View object. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Basic transitions include rotating, fading, moving, and stretching a graphic. </li></ul></ul></ul></ul><ul><ul><ul><li>Frame animations </li></ul></ul></ul><ul><ul><ul><ul><li>Frame-by-frame animation lets you load a series of Drawable resources, one after another to create an animation. </li></ul></ul></ul></ul><ul><ul><li>Property animations ( android.animation // new in honeycomb) </li></ul></ul><ul><ul><ul><li>Can animate almost anything (not just drawable objects!) </li></ul></ul></ul><ul><ul><ul><li>Can change any object property over time </li></ul></ul></ul><ul><ul><ul><li>View animations are simpler & quicker, property animations do more </li></ul></ul></ul><ul><ul><ul><li>http://developer.android.com/guide/topics/graphics/animation.html </li></ul></ul></ul>
  41. 42. OPEN GL ES TEXTURE COMPRESSION FORMATS <ul><ul><li>new <support-gl-texture> tag for Android manifest </li></ul></ul><ul><ul><li><supports-gl-texture android:name=&quot;string&quot; /> </li></ul></ul><ul><ul><li>declares one GL texture compression format that is supported by the application </li></ul></ul><ul><ul><li>supported == “app provides texture images in that format” (could be from apk file; could be downloaded from server </li></ul></ul><ul><ul><li>Different hw supports different texture compression, enabling developers to target specific GPUs. </li></ul></ul><ul><ul><li>The Android market filters on this. The tag is now active for all Android API levels, not just Honeycomb! So update your apps, if you don’t support all formats </li></ul></ul>
  42. 43. OPEN GL TEXTURE COMPRESSION FORMATS <ul><ul><li>MOTODEV Tech library has great article: </li></ul></ul><ul><ul><li>http:// developer.motorola.com/docstools/library/understanding-texture-compression/ </li></ul></ul><ul><ul><li>Names at developer.android.com/guide/topics/manifest/supports-gl-texture-element.html E.g. </li></ul></ul><ul><ul><li>GL_EXT_texture_compression_s3tc = S3 compression, used on Tegra 2 </li></ul></ul><ul><ul><li>… about 8 values in all </li></ul></ul>
  43. 44. RENDERSCRIPT Page Version 1.0 © 2010 Motorola Mobility, Inc. <ul><ul><li>New, high performance 3D graphics API </li></ul></ul><ul><ul><li>Was used in Froyo for Live Wallpaper </li></ul></ul><ul><ul><li>Is used in Honeycomb for Books and YouTube app </li></ul></ul><ul><ul><li>Honeycomb introduces Renderscript as a public API </li></ul></ul><ul><ul><li>For performance critical code where the traditional Open GL ES framework APIs are not fast enough! </li></ul></ul>
  44. 45. YOUTUBE AND RENDERSCRIPT Version 1.0 © 2010 Motorola Mobility, Inc.
  46. 47. RENDERSCRIPT API <ul><ul><li>A “computing” API for locating moving points in 3D </li></ul></ul><ul><ul><li>A “rendering” API for drawing textures over the points </li></ul></ul><ul><ul><li>A C-based scripting language to access this API </li></ul></ul><ul><ul><li>Only goal: squeeze last ounce of graphics performance! </li></ul></ul><ul><ul><li>Approach: API is a thin layer over features that are hardware-supported </li></ul></ul><ul><ul><li>http://community.developer.motorola.com/t5/MOTODEV-Blog/Introduction-to-Renderscript/ba-p/12136 </li></ul></ul>
  47. 48. RENDERSCRIPT API <ul><ul><li>Android build tools compile your Renderscript .rs file to intermediate bytecode </li></ul></ul><ul><ul><li>and package it inside your application's .apk file </li></ul></ul><ul><ul><li>On the device, the bytecode is compiled (just-in-time) to machine code that is optimized for the exact device that it is running on </li></ul></ul><ul><ul><li>Machine code is cached for future use </li></ul></ul><ul><ul><li>This eliminates the need to target a specific architecture during the development process. Excellent! </li></ul></ul>
  48. 49. EXAMPLE .RS FILE (FROM ANDROID 3.0 SAMPLES) <ul><ul><li>#pragma rs java_package_name(com.android.rs.helloworld) </li></ul></ul><ul><ul><li>#include &quot;rs_graphics.rsh” // header with graphics API’s </li></ul></ul><ul><ul><li>// gTouchX and gTouchY are variables that will be reflected for use </li></ul></ul><ul><ul><li>// by the java API. We can use them to notify the script of touch events. </li></ul></ul><ul><ul><li>int gTouchX; </li></ul></ul><ul><ul><li>int gTouchY; </li></ul></ul><ul><ul><li>// This is invoked automatically when the script is created </li></ul></ul><ul><ul><li>void init() { </li></ul></ul><ul><ul><li>gTouchX = 50.0f; </li></ul></ul><ul><ul><li>gTouchY = 50.0f; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>int root(int launchID) { </li></ul></ul><ul><ul><li>// Clear the background color </li></ul></ul><ul><ul><li>rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); </li></ul></ul><ul><ul><li>// Tell the runtime what the font color should be </li></ul></ul><ul><ul><li>rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f); </li></ul></ul><ul><ul><li>// Introduce ourselves to the world by drawing a greeting </li></ul></ul><ul><ul><li>// at the position user touched on the screen </li></ul></ul><ul><ul><li>rsgDrawText(&quot;Hello World!&quot;, gTouchX, gTouchY); </li></ul></ul><ul><ul><li>// Return value tells RS roughly how often to redraw </li></ul></ul><ul><ul><li>// in this case 20 ms </li></ul></ul><ul><ul><li>return 20; </li></ul></ul><ul><ul><li>} </li></ul></ul>
  49. 50. SENSORS Version 1.0 © 2010 Motorola Mobility, Inc. <ul><ul><li>Accelerometer, Gyroscope, Magnetometer, Barometer, Compass, Ambient Light, GPS, no proximity sensor </li></ul></ul><ul><ul><li>Device Orientation </li></ul></ul><ul><ul><ul><li>Natural orientation is landscape with 4-way rotation </li></ul></ul></ul>-y e +y es +x -x +z +y e +y e -x +x -y e -y e +x -x Rotation 0 Rotation 0 Rotation 90
  50. 51. SENSORS <ul><ul><li>These came in Gingerbread, but Honeycomb has the first hardware </li></ul></ul><ul><ul><li>Gyroscope </li></ul></ul><ul><ul><li>measures rotation in 3 axes </li></ul></ul><ul><ul><li>unit is radians/sec </li></ul></ul><ul><ul><li>http://developer.android.com/reference/android/hardware/SensorEvent.html </li></ul></ul><ul><ul><li>Barometer </li></ul></ul><ul><ul><li>measures ambient air pressure </li></ul></ul><ul><ul><li>unit is millibars - equivalent to 1 hPa (hectopascal) </li></ul></ul>
  51. 52. GYROSCOPE SENSOR android.hardware.SensorManager sm = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor gyro = sm. getDefaultSensor (Sensor.TYPE_GYROSCOPE); if (gyro != null) { // have got the gyroscope boolean active = sm.registerListener( this, gyro, sm.SENSOR_DELAY_NORMAL);
  52. 53. GYROSCOPE SENSOR READING public class main extends Activity implements SensorEventListener { public void onAccuracyChanged(Sensor s, int i) { } private float x,y,z; public void onSensorChanged(SensorEvent event) { switch (event.sensor.getType()) { case Sensor.TYPE_GYROSCOPE: x = event.values[0]; y = event.values[1]; z = event.values[2]; break; Minor “gotcha” – you don’t own the event, and can’t hold onto it.
  53. 54. BAROMETER SENSOR SensorManager sm = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor bar = sm. getDefaultSensor (Sensor.TYPE_PRESSURE); if (bar != null) { // have got the barometer boolean active = sm.registerListener( this, bar, sm.SENSOR_DELAY_NORMAL);
  54. 55. BAROMETER SENSOR READING public void onSensorChanged(SensorEvent event) { switch (event.sensor.getType()) { case Sensor.TYPE_PRESSURE: java.text.DecimalFormat df = new java.text.DecimalFormat(&quot;#.#&quot;); String reading = &quot;PRESSURE: &quot; + df.format( event.values[0] ) + &quot; millibars&quot;;  break;
  55. 56. BAROMETER SENSOR READING © 2010 Motorola Mobility, Inc. // www.engineeringtoolbox.com/air-altitude-pressure-d_462.html // lower by ~ 1.2 gm /cm2 for each 10 meter gain in elevation
  56. 57. MEDIA SUPPORT – GETTING CONTENT ON THE DEVICE <ul><li>Digital media file transfer </li></ul><ul><ul><li>Built in support for Media/Picture Transport Protocol (MTP/PTP). </li></ul></ul><ul><ul><li>User plugs USB cable in and the Android File Transfer application launches. </li></ul></ul><ul><ul><li>Users can copy pictures, movies, videos, ringtones, podcasts, and more to predefined folders, or create new folders for other content. </li></ul></ul>
  57. 58. TEN THINGS YOU CAN DO RIGHT NOW <ul><li>Download the Honeycomb SDK (and updated tools) and test drive your app on the emulator. </li></ul><ul><ul><li>Note if you have the preview SDK replace it with the updated public SDK. </li></ul></ul><ul><li>Change the targetSdkVersion to “ 11 ” and see what changes. </li></ul><ul><li>Add /res/layout-xlarge and /res/layout-xlarge-port folders to your project with layouts optimized for the larger screen. </li></ul><ul><li>Update error handling to exit gracefully rather than defaulting to ANRs or letting the user hang. </li></ul>
  58. 59. TEN THINGS YOU CAN DO RIGHT NOW <ul><li>Revisit your graphics in /res/drawable-< density > . </li></ul><ul><ul><li>Put background into ImageView and set scaleType=centerCrop </li></ul></ul><ul><ul><li>Patterned images can be tiled </li></ul></ul><ul><ul><li>Read into createScaledBitmap() using the dimensions from DisplayMetrics </li></ul></ul>
  59. 60. TEN THINGS YOU CAN DO RIGHT NOW <ul><li>Determine if you are going with one code base or two. </li></ul><ul><li>Build your app against Android 3.0 and install on the emulator. </li></ul><ul><li>Begin testing the features of the Action Bar. </li></ul><ul><li>Add a fragment to your activity. </li></ul><ul><li>Download the Honeycomb SDK (and updated tools) and test drive your app on the emulator. </li></ul>
  60. 61. MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2011 Motorola Mobility, Inc. All rights reserved. Lori Fraleigh PARTNERING WITH MOTODEV
  61. 63. MOTOROLA MOBILITY DEVELOPER NETWORK <ul><li>Detailed product specs </li></ul><ul><li>Practical advice, technical articles, and documentation </li></ul><ul><li>Expert support via forums </li></ul><ul><li>Community interaction via blogs, podcasts, and social media </li></ul><ul><li>Global news, events, and training </li></ul><ul><li>Web: developer.motorola.com </li></ul><ul><li>Twitter: @motodev </li></ul>
  63. 65. MOTODEV APPLICATION TESTING PROGRAM <ul><li>Identifies applications which are compatible with and optimized for Motorola devices with an initial focus on tablet applications </li></ul><ul><li>Developers whose applications are deemed to be “Ready for MOTOROLA XOOM” can participate in a growing set of global application discovery and delivery channels. </li></ul>
  64. 66. MOTODEV APP VALIDATOR Drag. Drop. Get Results.
  65. 67. GET STARTED NOW! <ul><li>Download MOTODEV Studio and the Android 3.0 SDK </li></ul><ul><li>Test your app with the MOTODEV App Validator </li></ul><ul><li>Upload your apps to Android Market </li></ul><ul><li>Submit your app to the MOTODEV Application Testing Program </li></ul><ul><li>Join our NEW online office hours </li></ul><ul><ul><li>MOTOROLA XOOM office hours 3/16 at 2pm PST </li></ul></ul><ul><li>Leverage other MOTODEV resources </li></ul><ul><ul><li>Ask questions in our discussion boards </li></ul></ul><ul><ul><li>Sign-up for the MOTOROLA ATRIX webinar with AT&T on 3/29 </li></ul></ul>
  66. 68. LIFE. POWERED.
  67. 69. LEGAL <ul><li>LICENSE NOTICES </li></ul><ul><li>Except where noted, sample source code written by Motorola Mobility Inc. and provided to you is licensed as described below. </li></ul><ul><li>Copyright © 2010-2011, Motorola, Inc. All rights reserved except as otherwise explicitly indicated. </li></ul><ul><li>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: </li></ul><ul><li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. </li></ul><ul><li>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. </li></ul><ul><li>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. </li></ul><ul><li>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. </li></ul><ul><li>Other source code displayed in this presentation may be offered under other licenses. 
 </li></ul><ul><li>Apache 2.0 </li></ul><ul><li>Copyright © 2010, Android Open Source Project. All rights reserved unless otherwise explicitly indicated. </li></ul><ul><li>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 . </li></ul><ul><li>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. </li></ul><ul><li>Creative Commons 3.0 Attribution License </li></ul><ul><li>Portions of this presentation are reproduced from work created and shared by Google (http://code.google.com/policies.html) and used according to terms described in the Creative Commons 3.0 Attribution License (http://creativecommons.org/licenses/by/3.0/). </li></ul>

Notes de l'éditeur

  • Interconnectivity is creating new social behaviors and changing the way consumers interact with and share information.
  • Motorola XOOM and Atrix the first expressions of our push into new converged product categories.
  • Succeeding in this new landscape requires applications that enable new user experiences. We want to work closely with you through MOTODEV to create and delivers new types of apps that are relevant across multiple screens, sync across device types and drive interactions between devices. That is what tonight is all about so thank you for coming and let’s get started!
  • Dual-core 1.0 GHz NVIDIA Tegra 2 with ultra-low power NVIDIA GeForce GPU Android 2.2.1 (Froyo) 4 inch qHD pentile display (540x960) “ normal” screen size, “high” screen density (hdpi) Flash Player 10.1 Record and playback 720p HD video at 30 fps (decode 1080p video)
  • SOURCE: Gartner Research Article – Title - Gartner Says Worldwide Mobile Device Sales to End Users Reached 1.6 Billion Units in 2010; Smartphone Sales Grew 72 Percent in 2010 (2/9/2011) “ In the smartphone operating system (OS) market, &apos;&apos;Android grew 888.8 percent in 2010 and moved to the No. 2 position.” – (pg3 of 4) From Ingrid K.
  • Possible Replacement for Slide 7 with updated figures. Need to find out what the source is for this chart. SOURCE: From Consumer Insights Report (Motorola) CRMOTO Q4&apos;10 USA Report.ppt
  • This is a typical Android smartphone. Across the top is your status bar where your status icons appear (battery, wifi, etc). This is also where your notifications can be found. Touching the status bar opens the notification panel. Moving to the bottom of the device, is where you’ll find buttons. Prehoneycomb devices were required to have 3 buttons – menu, home, and back. There’s usually a fourth button (in this case search). So that’s a typical smartphone.
  • When you’re talking about tablets things change. On the hardware side there are only three buttons on the device – volume up, volume down, and power.
  • Moving to the home screen it’s a very different UI. From an apps perspective there are a couple things you should be aware of. For instance… You have the system bar along the bottom. The back and home button on the lower left. There is NO menu button. Menus are now all in software and only available from within an application. On the lower right is where your status bar icons now appear as well as you notification panel. From a user perspective there’s much more to it but from a developer’s standpoint, those are the things you should be aware of. They won’t necessarily impact your application but it may change the way you think about things.
  • So lets talk about the writing apps. You can’t talk about the XOOM without talking about honeycomb. One of the biggest changes for applications is in the UI. This is a list of the additions and redesigns Google made to the UI. I’ll walk you through a handful of them.
  • Select a view that you want to associate the dimmer with (I have an id assigned to my root linearLayout) and set the visibility. You can attach the call to any view (including buttons) so may want to toggle the dimmer. If you touch the system bar the icons reappear. Touching the view dims the system bar. Book reader is a good example of dimming.
  • Replaces the title bar. This is the simplest form of an action bar. The Action Bar is included by default in all activities that target Android 3.0 or greater (setting minSdk or targetSdk = 11) Basic action bar with an overflow menu. The menu in the action bar replaces the hard menu button on the front of the device. The default behavior for the application icon is to do nothing. The title can be displayed or hidden.
  • Action bars get more feature rich from there. There are many extensions you can make to the action bar including -- actionable application icon with R.id.home in onOptionsMenuSelected -- adding tabs -- creating individual actionable items with or without text and titles -- Provide a drop-down list for navigation -- Provide interactive &amp;quot;action views&amp;quot; in place of action items (such as a search box).
  • One final note on menus. To support forward compatibility a soft menu button is provided along the system bar for pre-honeycomb apps. If you open the menu you can see where and what the menu items looks like.
  • Starting with 3.0 developers can divide the Activities of their applications into subcomponents called Fragments. Fragments -- can be added, removed, replaced, and animated inside an Activity dynamically -- are modular and reusable across multiple Activities. Here we’ve got the updated version of the contacts app showing the list of contacts in a fragment on the left and the details of the selected contact in a fragment on the right.
  • Fragments can not stand on their own. They must be included in an activity. However fragments are self contained in that they have their own life cycle as well as their own UI layout. One of the most common ways to use fragments is to associate a content fragment with an item in a list. There’s a separate type of fragment, called a ListFragment, that lets you do this. The content fragment can contain anything you would normally use in an activity – images, text, ui elements, etc.
  • (Nothing changes in the AndroidManifest file) Adding a fragment to an activity requires updates to the activity’s layout file. You must add the fragment to your Activity’s layout file with a &lt;fragment&gt; tag. In the fragment tag you declare the class name of the fragment that’s defined usually in a separate .java file. Pay attention to the root layout or container you use. In this case I used LinearLayout which, by default has a top to bottom placement. So when I first did this app my fragments did not appear side-by-side, they appeared top-to-bottom. I needed to add orientation=horizontal in order to get the side-by-side. The device’s orientation is landscape by default so if you want a portrait version of the app to be top-to-bottom you’ll need to create another layout-port file specifying orientation=portrait.
  • Follow instructions for using Data Storage to external media http://developer.android.com/guide/topics/data/data-storage.html Every Android-compatible device supports a shared storage. Shared files: Music/ - Media scanner classifies all media found here as user music. Podcasts/ - Media scanner classifies all media found here as a podcast. Ringtones/ - Media scanner classifies all media found here as a ringtone. Alarms/ - Media scanner classifies all media found here as an alarm sound. Notifications/ - Media scanner classifies all media found here as a notification sound. Pictures/ - All photos (excluding those taken with the camera). Movies/ - All movies (excluding those taken with the camcorder). Download/ - Miscellaneous downloads. Private files can be placed in /android/data/&lt;appname&gt; folder.
  • Apps are always forward compatible but……
  • Apps are always forward compatible but……
  • Test Criteria: App Behavior Is all functionality accessible, performing well, and fitting well on the device screen? Are all input methods properly supported? Are all strings spelled correctly and properly translated (if multiple languages are supported)? Stability Tests Does the app handle both app and system events correctly, including any errors / failures? XOOM Specific Does the app support the Tablet UI framework and are all stacks and activity frameworks properly maintained? Does the app leverage the new Action Bar API and do all controls respond properly?
  • Android Market filters Mismatched manifest.ini settings Layout issues specific to different sized displays Missing drawable resources Improperly localized apps Forbidden or dangerous permission