Android 3.1 Portland Code Camp     Sean Sullivan     June 4, 2011
• Introduction• Android devices• Android 3.x• App development
iPhone   Android
Mobile World Congress   February 2011
source: comScore
Android phones
2008
2009
2010
2011
Android tablets
XOOM tech specs    •   Android 3.1    •   10.1 inch touchscreen display    •   1280 x 800    •   160 dpi
XOOM tech specs    •   NVIDIA Tegra 2 dual-core chipset    •   HDMI connector    •   two cameras    •   no physical keyboard
What’s new in Android 3.x?
•   ‘holographic’ UI theme•   Action Bar•   Fragments•   Drag and Drop•   Digital Rights Management•   and more...
‘holographic’ UI
Action Bar
“The Action Bar is a widget for activities thatreplaces the traditional title bar at the top ofthe screen.By default, the ...
Action Bar
Fragments
“A Fragment represents a behavior or a portion of userinterface in an Activity. You can combine multiple fragmentsin a sin...
• Fragments decompose application functionality and UI  into reusable modules• Add multiple fragments to a screen to avoid...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"        android:orientation="horizontal"        an...
public static class TitlesFragment extends ListFragment {    private boolean mDualPane;    private int mCurCheckPosition =...
Drag and drop
Renderscript
“The Renderscript rendering and computational APIsoffer a low-level, high performance means of carrying outmathematical ca...
New animation API
Digital Rights Management API
The same security issues that have led to piracyconcerns on the Android platform have made itdifficult for us to secure a ...
Unfortunately, this is a much slower approach and  leads to a fragmented experience on Android, in  which some handsets wi...
New in Android 3.1• Open Accessory API• USB Host API• Input from mice, joysticks, gamepads• Resizable home screen widgets•...
Application development
Android emulator
Emulator performance
Because the Android emulator must simulate the ARM instruction seton your computer and the WXGA screen is significantly la...
In particular, initializing the emulator can be slow and can take severalminutes, depending on your hardware. When the emu...
However, you dont need to boot the emulator each time you rebuildyour application—typically you only need to boot at the s...
Sample code
API differences
http://developer.android.com/sdk/api_diff/11/changes.html
Best practices
http://android-developers.blogspot.com/2011/02/best-practices-for-honeycomb-and.html
What’s next?
Final thoughts• Android 3.1 is for tablets, not phones• XOOM and G-Slate are available now• More tablets coming to market•...
Thank you
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
Upcoming SlideShare
Loading in...5
×

Android 3.1 - Portland Code Camp 2011

1,696

Published on

Android 3.1
Portland Code Camp
June 4, 2011
Portland, Oregon

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,696
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
46
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Android 3.1 - Portland Code Camp 2011

  1. 1. Android 3.1 Portland Code Camp Sean Sullivan June 4, 2011
  2. 2. • Introduction• Android devices• Android 3.x• App development
  3. 3. iPhone Android
  4. 4. Mobile World Congress February 2011
  5. 5. source: comScore
  6. 6. Android phones
  7. 7. 2008
  8. 8. 2009
  9. 9. 2010
  10. 10. 2011
  11. 11. Android tablets
  12. 12. XOOM tech specs • Android 3.1 • 10.1 inch touchscreen display • 1280 x 800 • 160 dpi
  13. 13. XOOM tech specs • NVIDIA Tegra 2 dual-core chipset • HDMI connector • two cameras • no physical keyboard
  14. 14. What’s new in Android 3.x?
  15. 15. • ‘holographic’ UI theme• Action Bar• Fragments• Drag and Drop• Digital Rights Management• and more...
  16. 16. ‘holographic’ UI
  17. 17. Action Bar
  18. 18. “The Action Bar is a widget for activities thatreplaces the traditional title bar at the top ofthe screen.By default, the Action Bar includes theapplication logo on the left side, followed bythe activity title, and any available itemsfrom the Options Menu on the right side.”
  19. 19. Action Bar
  20. 20. Fragments
  21. 21. “A Fragment represents a behavior or a portion of userinterface in an Activity. You can combine multiple fragmentsin a single activity to build a multi-pane UI and reuse afragment in multiple activities.You can think of a fragmentas a modular section of an activity, which has its ownlifecycle, receives its own input events, and which you canadd or remove while the activity is running.” http://developer.android.com/guide/topics/fundamentals/fragments.html
  22. 22. • Fragments decompose application functionality and UI into reusable modules• Add multiple fragments to a screen to avoid switching activities• Fragments have their own lifecycle, state, and back stack• Fragments require API Level "Honeycomb" or greater http://developer.android.com/guide/topics/fundamentals/fragments.html
  23. 23. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"        android:orientation="horizontal"        android:layout_width="match_parent"        android:layout_height="match_parent">    <fragment class="com.example.android.apis.app.TitlesFragment"            android:id="@+id/titles" android:layout_weight="1"            android:layout_width="0px"            android:layout_height="match_parent" />    <FrameLayout android:id="@+id/details" android:layout_weight="1"            android:layout_width="0px"            android:layout_height="match_parent" />   </LinearLayout>
  24. 24. public static class TitlesFragment extends ListFragment {    private boolean mDualPane;    private int mCurCheckPosition = 0;    @Override    public void onActivityCreated(Bundle savedState) {        super.onActivityCreated(savedState); // do something here    }    @Override    public void onSaveInstanceState(Bundle outState) {        super.onSaveInstanceState(outState);        outState.putInt("curChoice", mCurCheckPosition);    }    @Override    public void onListItemClick(ListView l, View v, int pos, long id) {        // do something here    }}
  25. 25. Drag and drop
  26. 26. Renderscript
  27. 27. “The Renderscript rendering and computational APIsoffer a low-level, high performance means of carrying outmathematical calculations and 3D graphics rendering.”
  28. 28. New animation API
  29. 29. Digital Rights Management API
  30. 30. The same security issues that have led to piracyconcerns on the Android platform have made itdifficult for us to secure a common Digital RightsManagement (DRM) system on these devices. [...]Although we don’t have a common platformsecurity mechanism and DRM, we are able to workwith individual handset manufacturers to addcontent protection to their devices. November 2010 http://blog.netflix.com/2010/11/netflix-on-android.html
  31. 31. Unfortunately, this is a much slower approach and leads to a fragmented experience on Android, in which some handsets will have access to Netflix and others won’t.We will also continue to work with the Androidcommunity, handset manufacturers, carriers, andother service providers to develop a standard,platform-wide solution that allows content providersto deliver their services to all Android-based devices November 2010 http://blog.netflix.com/2010/11/netflix-on-android.html
  32. 32. New in Android 3.1• Open Accessory API• USB Host API• Input from mice, joysticks, gamepads• Resizable home screen widgets• Media Transfer Protocol (MTP)• Real-time Transport Protocol (RTP)
  33. 33. Application development
  34. 34. Android emulator
  35. 35. Emulator performance
  36. 36. Because the Android emulator must simulate the ARM instruction seton your computer and the WXGA screen is significantly larger than atypical virtual device, emulator performance is much slower than a realdevice. source: developer.android.com
  37. 37. In particular, initializing the emulator can be slow and can take severalminutes, depending on your hardware. When the emulator is booting,there is limited user feedback, so please be patient and wait until yousee the home screen (or lock screen) appear. source: developer.android.com
  38. 38. However, you dont need to boot the emulator each time you rebuildyour application—typically you only need to boot at the start of asession and keep it running. Also see the tip below for informationabout using a snapshot to drastically reduce startup time after the firstinitialization.Were working hard to resolve the performance issues and it willimprove in future tools releases. source: developer.android.com
  39. 39. Sample code
  40. 40. API differences
  41. 41. http://developer.android.com/sdk/api_diff/11/changes.html
  42. 42. Best practices
  43. 43. http://android-developers.blogspot.com/2011/02/best-practices-for-honeycomb-and.html
  44. 44. What’s next?
  45. 45. Final thoughts• Android 3.1 is for tablets, not phones• XOOM and G-Slate are available now• More tablets coming to market• Learn the Fragments API
  46. 46. Thank you
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×