SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Q3 2011
Q3 2011




Introduction to
Honeycomb APIs
Q3 2011
Q3 2011


Honeycomb

§  Focused on tablets
§  Huge release, many updates and new
    features
§  New holographic system theme
§  Version 3.0 (base), 3.1 and 3.2 (point
    releases), API levels 11/12/13


                                                  3
Q3 2011


System Bar

§  System-wide navigation and status
§  Orientation agnostic
§  Always there with varying height
  –  ~48dp-56dp
  –  design flexible layouts!
  –  can use display.getHeight()/getWidth() !




                                             4
Q3 2011


System Bar

§  Lights out mode

mView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);!
mView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);!




                                                     5
Q3 2011


Notifications

§  Android’s great notifications, improved
§  Dismiss individually
§  Customizable
  –  Larger icon
  –  Actionable buttons




                                                   6
Q3 2011


Action Bar




     Navigation   Custom   Action
App Icon           View    Items




                                         7
Q3 2011


Action Bar (Action Items)




§  Menu items from Options Menu
§  Easily configured via menu resource file

<item android:id="@+id/menu_add"

   android:icon="@drawable/ic_menu_save"

   android:title="@string/menu_save"

   android:showAsAction="ifRoom|withText" />!

                                                     8
Q3 2011


Action Bar (Action Items)
public boolean onCreateOptionsMenu(Menu menu) {!
    MenuInflater inflater = getActivity().getMenuInflater();!
    inflater.inflate(R.menu.my_menu, menu);!
    return true;!
}!



public boolean onOptionsItemSelected(MenuItem item) {!
   switch (item.getItemId()) {!
      case android.R.id.home:!
        // app icon in Action Bar clicked; go home!
        return true;!
      case R.id.my_menu_item:!
        // app menu item selected!
        return true;!
      default:!
        return super.onOptionsItemSelected(item);!
   }!
}!
                                                                9
Q3 2011


Redesigned Home Screen Widgets

§  Users can interact with home screen widgets
    in new ways like flipping and scrolling
§  New widgets: ListView, GridView, StackView…
§  Resizable (from 3.1)




                                                  10
Q3 2011


Fragments
       Phone                     Tablet




  Activity
    1      Activity   Fragment       Fragment
             2            1              2

 Activity
 Fragment


Re-think your UI, don’t just let it stretch!
                                                     11
Q3 2011


Fragments




                12
Q3 2011


Fragments – Lifecycle




                            13
Q3 2011


Fragments – Other Uses

§  Award for best named method:
  –    onRetainNonConfigurationInstance()!

§  Instead use:
  –  setRetainInstance(true)!

§  Fragments without UI
  –  Retain state through configuration changes
  –  Use in conjunction with AsyncTask

                                                      14
Q3 2011


Fragments – Summary

§  Reusable UI components within an Activity
§  Has its own lifecycle and back stack. Its lifecycle is
    affected by the host Activity’s lifecycle
§  Attach to a ViewGroup in the Activity view hierarchy
    through <fragment> in XML or programmatically
§  Act as a background worker (findFragmentByTag)
§  Can be added, removed and replaced via
    FragmentTransaction!
§  Can communicate with each other via
    FragmentManager!
                                                             15
Q3 2011


Fragments Example

// Get FragmentManager!
FragmentManager fragmentManager = getFragmentManager();!
!
// Create new fragment and transaction!
Fragment newFragment = new ExampleFragment();!
!
FragmentTransaction transaction =!
    fragmentManager.beginTransaction();!
!
// Replace view and add to back stack!
transaction.replace(R.id.fragment_container, newFragment);!
transaction.addToBackStack(null);!
!
// Commit!
transaction.commit();!


                                                         16
Q3 2011


Loaders

§  Easy way to asynchronously load data in
    an Activity or Fragment
§  Monitors data source and deliver results
    when content changes
§  Automatically reconnect after
    configuration change


                                               17
Q3 2011


CursorLoader Example

§  Implement LoaderManager.LoaderCallbacks!
public Loader<Cursor> onCreateLoader(int id, Bundle args) {!
   ...!
   return new CursorLoader(!
        getActivity(), mUri, mProjection,!
        mSelection, mSelectionArgs, mSortOrder)!
}!
!
public void onLoadFinished(Loader<Cursor> loader,!
     Cursor data) {!
   mAdapter.swapCursor(data);!
}!
!
public void onLoaderReset(Loader<Cursor> loader) {!
   mAdapter.swapCursor(null);!
}!                                                       18
Q3 2011


CursorLoader Example

§  Init loader in onCreate()!

SimpleCursorAdapter mAdapter;!
!
public void onActivityCreated(Bundle savedInstanceState) {!
   ...!
   mAdapter = new SimpleCursorAdapter(...);!
   setListAdapter(mAdapter);!
   getLoaderManager().initLoader(0, null, this);!
}!




                                                         19
Q3 2011


Clipboard Framework – Copy & Paste

§  Supports 3 types of content
  –  Text
  –  URI
  –  Intent

§  At any time, only one clip on the clipboard
§  For each clip (ClipData), it can store
    multiple items of the same type
§  You decide what MIME types can be
    handled by your app                          20
Q3 2011


Drag and Drop

§  A drag begins by calling
view.startDrag(dragData, shadow, null, 0);!


§  To accept a drop implement
View.OnDragListener!

§  Use ClipData to store “drag” data


                                                  21
Q3 2011


Hardware Acceleration

§  Speed up standard widgets, drawables –
    all drawing operations on View’s Canvas
§  Can be set at the Activity, Window and
    View levels
§  Default is disabled

<application android:hardwareAccelerated=“true”>!
   …        !
</application>!

                                                    22
Q3 2011


Renderscript

§  High performance 3D rendering and
    compute API
§  Written in C99 (a dialect of C)
§  Pros: portability, performance, usability
§  Cons: new APIs, debugging, fewer
    features (compared to OpenGL)


                                                23
Q3 2011


Renderscript – Sample Apps

                     Google Books




        YouTube
                                        24
Q3 2011


Property Animation Framework

§  New animation system that can animate
    any object’s properties
§  Changes objects and their behavior as
    well
§  Can animate changes to a ViewGroup!
§  ViewPropertyAnimator (3.1+) makes
 animations even simpler and more
 efficient
                                            25
Q3 2011


Property Animation Framework

§  Simple property animation:
ObjectAnimator.ofFloat(myView, "alpha", 0f)!
  .setDuration(500)

  .start();!



§  Even better using ViewPropertyAnimator:
myView.animate().setDuration(500).alpha(0);!




                                                   26
Q3 2011


Enterprise

§  Support for encrypted storage
§  New device administration policy support
  –  Encrypted storage
  –  Password expiration
  –  Password history
  –  Password complex character required




                                               27
Q3 2011


Media – Updates from Android 3.0, 3.1, 3.2

§  HTTP Live Streaming
§  Pluggable DRM framework
§  Inline playback of HTML5 <video>!
§  MTP/PTP
§  RTP
§  Updated Media Formats
  –  Raw ADTS AAC, FLAC…
                                            28
Q3 2011




Your App & Honeycomb
Q3 2011


Design With Tablets in Mind

§  Use density independent pixels (dp)
§  Design flexible layouts
§  Centralize dimensions using dimens.xml!
§  Keep application logic and UI separate
§  Support landscape and don’t assume
    portrait

                                              30
Q3 2011


Updating Your App for Honeycomb
§  Test holographic theme
§  Update for ActionBar
§  Add higher resolution graphics
§  Tweak layouts, spacing, font sizes
§  Fragments
<manifest ... >!
    <uses-sdk android:minSdkVersion="4" !
              android:targetSdkVersion="11" />!
</manifest>!
                                                      31
Q3 2011


Compatibility Library

§  Not really a compatibility library anymore,
    more of a support library
§  Works back to API Level 4 (Donut / 1.6)
§  Provides:
  –  Fragments
  –  Loaders
  –  ViewPager / PagerAdapter - neat!
  –  LruCache
  –  and more…
                                               32
Q3 2011


Screen Size Support – Updated in 3.2

§  Screen compatibility mode
§  Optimizations for a wider range of tablets
§  New numeric selectors
  –  smallestWidth (res/layout-sw720dp)
  –  width (res/layout-w600dp)
  –  height (res/layout-h720dp)




                                                 33
Q3 2011


Looking Forward

§  Ice Cream Sandwich – very tasty dessert




                                              34
Q3 2011




    For more, visit
developer.android.com
Q3 2011


Copyrights and trademarks

§  Android, Google are registered
    trademarks of Google Inc.
§  All other trademarks and copyrights are
    the property of their respective owners.




                                               36

Mais conteúdo relacionado

Mais procurados

Image processing techniques 1
Image processing techniques   1Image processing techniques   1
Image processing techniques 11988sreejith
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sAdam Wilson
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...AIP Foundation
 
View groups containers
View groups containersView groups containers
View groups containersMani Selvaraj
 
iOS 7 UI Transition Guide
iOS 7 UI Transition GuideiOS 7 UI Transition Guide
iOS 7 UI Transition GuideEvgeny Belyaev
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connectionsVincent Burckhardt
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TVGauntFace
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationVu Tran Lam
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI ReferenceGauntFace
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & LayoutsVijay Rastogi
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
I phone human interface guidlines
I phone human interface guidlinesI phone human interface guidlines
I phone human interface guidlineszhuxiongjie
 
Accessible web applications
Accessible web applications Accessible web applications
Accessible web applications Steven Faulkner
 

Mais procurados (20)

Image processing techniques 1
Image processing techniques   1Image processing techniques   1
Image processing techniques 1
 
Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
Motion 4 user manual (en)
Motion 4 user manual (en)Motion 4 user manual (en)
Motion 4 user manual (en)
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’s
 
Android and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
 
Unit2
Unit2Unit2
Unit2
 
View groups containers
View groups containersView groups containers
View groups containers
 
iOS 7 UI Transition Guide
iOS 7 UI Transition GuideiOS 7 UI Transition Guide
iOS 7 UI Transition Guide
 
Sikuli
SikuliSikuli
Sikuli
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connections
 
Intro to Google TV
Intro to Google TVIntro to Google TV
Intro to Google TV
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
 
Report swings
Report swingsReport swings
Report swings
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
I phone human interface guidlines
I phone human interface guidlinesI phone human interface guidlines
I phone human interface guidlines
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Accessible web applications
Accessible web applications Accessible web applications
Accessible web applications
 

Semelhante a Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3

Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing HoneycombCommonsWare
 
Proteus - android layout engine
Proteus - android layout engineProteus - android layout engine
Proteus - android layout engineKiran Kumar
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesRyan Stewart
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsDarshan Parikh
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fastMichał Wróblewski
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answersRita Singh
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
Win8 development lessons learned jayway
Win8 development lessons learned jaywayWin8 development lessons learned jayway
Win8 development lessons learned jaywayAndreas Hammar
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...Akira Hatsune
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Androidrizki adam kurniawan
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011sullis
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 

Semelhante a Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3 (20)

Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
Windows phone and azure
Windows phone and azureWindows phone and azure
Windows phone and azure
 
Introducing Honeycomb
Introducing HoneycombIntroducing Honeycomb
Introducing Honeycomb
 
Proteus - android layout engine
Proteus - android layout engineProteus - android layout engine
Proteus - android layout engine
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Introduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile DevicesIntroduction to Flex Hero for Mobile Devices
Introduction to Flex Hero for Mobile Devices
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fast
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answers
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
Win8 development lessons learned jayway
Win8 development lessons learned jaywayWin8 development lessons learned jayway
Win8 development lessons learned jayway
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 

Mais de Paris Android User Group

Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Paris Android User Group
 
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Paris Android User Group
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014Paris Android User Group
 
Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Paris Android User Group
 
Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Paris Android User Group
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Paris Android User Group
 
Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Paris Android User Group
 
Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Paris Android User Group
 
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Paris Android User Group
 
maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014Paris Android User Group
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Paris Android User Group
 
Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Paris Android User Group
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Paris Android User Group
 
Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Paris Android User Group
 
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Paris Android User Group
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardParis Android User Group
 

Mais de Paris Android User Group (20)

Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014
 
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014
 
Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014
 
Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014
 
Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014
 
Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014
 
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
 
Buildsystem.mk - DroidCon Paris 2014
Buildsystem.mk - DroidCon Paris 2014Buildsystem.mk - DroidCon Paris 2014
Buildsystem.mk - DroidCon Paris 2014
 
maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014
 
Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014
 
Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014
 
Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014
 
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas Roard
 
Build a user experience by Eyal Lezmy
Build a user experience by Eyal LezmyBuild a user experience by Eyal Lezmy
Build a user experience by Eyal Lezmy
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3

  • 3. Q3 2011 Honeycomb §  Focused on tablets §  Huge release, many updates and new features §  New holographic system theme §  Version 3.0 (base), 3.1 and 3.2 (point releases), API levels 11/12/13 3
  • 4. Q3 2011 System Bar §  System-wide navigation and status §  Orientation agnostic §  Always there with varying height –  ~48dp-56dp –  design flexible layouts! –  can use display.getHeight()/getWidth() ! 4
  • 5. Q3 2011 System Bar §  Lights out mode mView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);! mView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);! 5
  • 6. Q3 2011 Notifications §  Android’s great notifications, improved §  Dismiss individually §  Customizable –  Larger icon –  Actionable buttons 6
  • 7. Q3 2011 Action Bar Navigation Custom Action App Icon View Items 7
  • 8. Q3 2011 Action Bar (Action Items) §  Menu items from Options Menu §  Easily configured via menu resource file <item android:id="@+id/menu_add"
    android:icon="@drawable/ic_menu_save"
    android:title="@string/menu_save"
    android:showAsAction="ifRoom|withText" />! 8
  • 9. Q3 2011 Action Bar (Action Items) public boolean onCreateOptionsMenu(Menu menu) {! MenuInflater inflater = getActivity().getMenuInflater();! inflater.inflate(R.menu.my_menu, menu);! return true;! }! public boolean onOptionsItemSelected(MenuItem item) {! switch (item.getItemId()) {! case android.R.id.home:! // app icon in Action Bar clicked; go home! return true;! case R.id.my_menu_item:! // app menu item selected! return true;! default:! return super.onOptionsItemSelected(item);! }! }! 9
  • 10. Q3 2011 Redesigned Home Screen Widgets §  Users can interact with home screen widgets in new ways like flipping and scrolling §  New widgets: ListView, GridView, StackView… §  Resizable (from 3.1) 10
  • 11. Q3 2011 Fragments Phone Tablet Activity 1 Activity Fragment Fragment 2 1 2 Activity Fragment Re-think your UI, don’t just let it stretch! 11
  • 13. Q3 2011 Fragments – Lifecycle 13
  • 14. Q3 2011 Fragments – Other Uses §  Award for best named method: –  onRetainNonConfigurationInstance()! §  Instead use: –  setRetainInstance(true)! §  Fragments without UI –  Retain state through configuration changes –  Use in conjunction with AsyncTask 14
  • 15. Q3 2011 Fragments – Summary §  Reusable UI components within an Activity §  Has its own lifecycle and back stack. Its lifecycle is affected by the host Activity’s lifecycle §  Attach to a ViewGroup in the Activity view hierarchy through <fragment> in XML or programmatically §  Act as a background worker (findFragmentByTag) §  Can be added, removed and replaced via FragmentTransaction! §  Can communicate with each other via FragmentManager! 15
  • 16. Q3 2011 Fragments Example // Get FragmentManager! FragmentManager fragmentManager = getFragmentManager();! ! // Create new fragment and transaction! Fragment newFragment = new ExampleFragment();! ! FragmentTransaction transaction =! fragmentManager.beginTransaction();! ! // Replace view and add to back stack! transaction.replace(R.id.fragment_container, newFragment);! transaction.addToBackStack(null);! ! // Commit! transaction.commit();! 16
  • 17. Q3 2011 Loaders §  Easy way to asynchronously load data in an Activity or Fragment §  Monitors data source and deliver results when content changes §  Automatically reconnect after configuration change 17
  • 18. Q3 2011 CursorLoader Example §  Implement LoaderManager.LoaderCallbacks! public Loader<Cursor> onCreateLoader(int id, Bundle args) {! ...! return new CursorLoader(! getActivity(), mUri, mProjection,! mSelection, mSelectionArgs, mSortOrder)! }! ! public void onLoadFinished(Loader<Cursor> loader,! Cursor data) {! mAdapter.swapCursor(data);! }! ! public void onLoaderReset(Loader<Cursor> loader) {! mAdapter.swapCursor(null);! }! 18
  • 19. Q3 2011 CursorLoader Example §  Init loader in onCreate()! SimpleCursorAdapter mAdapter;! ! public void onActivityCreated(Bundle savedInstanceState) {! ...! mAdapter = new SimpleCursorAdapter(...);! setListAdapter(mAdapter);! getLoaderManager().initLoader(0, null, this);! }! 19
  • 20. Q3 2011 Clipboard Framework – Copy & Paste §  Supports 3 types of content –  Text –  URI –  Intent §  At any time, only one clip on the clipboard §  For each clip (ClipData), it can store multiple items of the same type §  You decide what MIME types can be handled by your app 20
  • 21. Q3 2011 Drag and Drop §  A drag begins by calling view.startDrag(dragData, shadow, null, 0);! §  To accept a drop implement View.OnDragListener! §  Use ClipData to store “drag” data 21
  • 22. Q3 2011 Hardware Acceleration §  Speed up standard widgets, drawables – all drawing operations on View’s Canvas §  Can be set at the Activity, Window and View levels §  Default is disabled <application android:hardwareAccelerated=“true”>! …        ! </application>! 22
  • 23. Q3 2011 Renderscript §  High performance 3D rendering and compute API §  Written in C99 (a dialect of C) §  Pros: portability, performance, usability §  Cons: new APIs, debugging, fewer features (compared to OpenGL) 23
  • 24. Q3 2011 Renderscript – Sample Apps Google Books YouTube 24
  • 25. Q3 2011 Property Animation Framework §  New animation system that can animate any object’s properties §  Changes objects and their behavior as well §  Can animate changes to a ViewGroup! §  ViewPropertyAnimator (3.1+) makes animations even simpler and more efficient 25
  • 26. Q3 2011 Property Animation Framework §  Simple property animation: ObjectAnimator.ofFloat(myView, "alpha", 0f)! .setDuration(500)
 .start();! §  Even better using ViewPropertyAnimator: myView.animate().setDuration(500).alpha(0);! 26
  • 27. Q3 2011 Enterprise §  Support for encrypted storage §  New device administration policy support –  Encrypted storage –  Password expiration –  Password history –  Password complex character required 27
  • 28. Q3 2011 Media – Updates from Android 3.0, 3.1, 3.2 §  HTTP Live Streaming §  Pluggable DRM framework §  Inline playback of HTML5 <video>! §  MTP/PTP §  RTP §  Updated Media Formats –  Raw ADTS AAC, FLAC… 28
  • 29. Q3 2011 Your App & Honeycomb
  • 30. Q3 2011 Design With Tablets in Mind §  Use density independent pixels (dp) §  Design flexible layouts §  Centralize dimensions using dimens.xml! §  Keep application logic and UI separate §  Support landscape and don’t assume portrait 30
  • 31. Q3 2011 Updating Your App for Honeycomb §  Test holographic theme §  Update for ActionBar §  Add higher resolution graphics §  Tweak layouts, spacing, font sizes §  Fragments <manifest ... >! <uses-sdk android:minSdkVersion="4" ! android:targetSdkVersion="11" />! </manifest>! 31
  • 32. Q3 2011 Compatibility Library §  Not really a compatibility library anymore, more of a support library §  Works back to API Level 4 (Donut / 1.6) §  Provides: –  Fragments –  Loaders –  ViewPager / PagerAdapter - neat! –  LruCache –  and more… 32
  • 33. Q3 2011 Screen Size Support – Updated in 3.2 §  Screen compatibility mode §  Optimizations for a wider range of tablets §  New numeric selectors –  smallestWidth (res/layout-sw720dp) –  width (res/layout-w600dp) –  height (res/layout-h720dp) 33
  • 34. Q3 2011 Looking Forward §  Ice Cream Sandwich – very tasty dessert 34
  • 35. Q3 2011 For more, visit developer.android.com
  • 36. Q3 2011 Copyrights and trademarks §  Android, Google are registered trademarks of Google Inc. §  All other trademarks and copyrights are the property of their respective owners. 36