Submit Search
Upload
Backwards Compatibility: Strategies and Tactics
•
0 likes
•
1,607 views
C
CommonsWare
Follow
From the AnDevCon III conference
Read less
Read more
Technology
Education
Report
Share
Report
Share
1 of 24
Download now
Download to read offline
Recommended
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
Opersys inc.
Introduction to android
Introduction to android
krishnastudent88
Slides bootcamp21
Slides bootcamp21
dxsaki
Android dev o_auth
Android dev o_auth
lzongren
Introduction to android sessions new
Introduction to android sessions new
Joe Jacob
Android Development Tutorial V3
Android Development Tutorial V3
Diego Torres Milano
Build Trust in Your Build-to-Deployment Flow!
Build Trust in Your Build-to-Deployment Flow!
Baruch Sadogursky
Android chapter02-setup2-emulator
Android chapter02-setup2-emulator
guru472
Recommended
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
Opersys inc.
Introduction to android
Introduction to android
krishnastudent88
Slides bootcamp21
Slides bootcamp21
dxsaki
Android dev o_auth
Android dev o_auth
lzongren
Introduction to android sessions new
Introduction to android sessions new
Joe Jacob
Android Development Tutorial V3
Android Development Tutorial V3
Diego Torres Milano
Build Trust in Your Build-to-Deployment Flow!
Build Trust in Your Build-to-Deployment Flow!
Baruch Sadogursky
Android chapter02-setup2-emulator
Android chapter02-setup2-emulator
guru472
Android Programming Basic
Android Programming Basic
Duy Do Phan
Basic android development
Basic android development
Upanya Singh
Android Programming
Android Programming
Pasi Manninen
Android session-1-sajib
Android session-1-sajib
Hussain Behestee
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)
Peter Mburu
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
Elvis Jon Freddy Sitinjak
Mobile Java
Mobile Java
Nikita Makarov
Android
Android
Ravina Bhavsar
Ii 1300-java essentials for android
Ii 1300-java essentials for android
Adrian Mikeliunas
Introduction to Android Development Part 1
Introduction to Android Development Part 1
Kainda Kiniel Daka
Android and its feature
Android and its feature
Shubham Kumar
Ii 1500-publishing your android application
Ii 1500-publishing your android application
Adrian Mikeliunas
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Kasun Dananjaya Delgolla
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
ddrschiw
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Paris Open Source Summit
Introduction to Android Development
Introduction to Android Development
Can Elmas
AD201 - IBM Domino Application Development Today And Tomorrow
AD201 - IBM Domino Application Development Today And Tomorrow
pjanzen11
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
MTJ Taking Mobile Java Developers to the Next Level
MTJ Taking Mobile Java Developers to the Next Level
gustavoeliano
Android Development Workshop
Android Development Workshop
Peter Robinett
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
More Related Content
What's hot
Android Programming Basic
Android Programming Basic
Duy Do Phan
Basic android development
Basic android development
Upanya Singh
Android Programming
Android Programming
Pasi Manninen
Android session-1-sajib
Android session-1-sajib
Hussain Behestee
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)
Peter Mburu
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
Elvis Jon Freddy Sitinjak
Mobile Java
Mobile Java
Nikita Makarov
Android
Android
Ravina Bhavsar
Ii 1300-java essentials for android
Ii 1300-java essentials for android
Adrian Mikeliunas
Introduction to Android Development Part 1
Introduction to Android Development Part 1
Kainda Kiniel Daka
Android and its feature
Android and its feature
Shubham Kumar
Ii 1500-publishing your android application
Ii 1500-publishing your android application
Adrian Mikeliunas
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Kasun Dananjaya Delgolla
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
ddrschiw
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Paris Open Source Summit
Introduction to Android Development
Introduction to Android Development
Can Elmas
AD201 - IBM Domino Application Development Today And Tomorrow
AD201 - IBM Domino Application Development Today And Tomorrow
pjanzen11
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
MTJ Taking Mobile Java Developers to the Next Level
MTJ Taking Mobile Java Developers to the Next Level
gustavoeliano
Android Development Workshop
Android Development Workshop
Peter Robinett
What's hot
(20)
Android Programming Basic
Android Programming Basic
Basic android development
Basic android development
Android Programming
Android Programming
Android session-1-sajib
Android session-1-sajib
9780134433646 annuzzi ch02 (1)
9780134433646 annuzzi ch02 (1)
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
Mobile Java
Mobile Java
Android
Android
Ii 1300-java essentials for android
Ii 1300-java essentials for android
Introduction to Android Development Part 1
Introduction to Android Development Part 1
Android and its feature
Android and its feature
Ii 1500-publishing your android application
Ii 1500-publishing your android application
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Rationalize Android Development with StAnD - Clement Escoffier, akquinet
Introduction to Android Development
Introduction to Android Development
AD201 - IBM Domino Application Development Today And Tomorrow
AD201 - IBM Domino Application Development Today And Tomorrow
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
MTJ Taking Mobile Java Developers to the Next Level
MTJ Taking Mobile Java Developers to the Next Level
Android Development Workshop
Android Development Workshop
Similar to Backwards Compatibility: Strategies and Tactics
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Android workshop material
Android workshop material
Reza Yogaswara
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
What's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
Gl android platform
Gl android platform
Pragya Rastogi
Android My Seminar
Android My Seminar
Ganesh Waghmare
Continuous integration for androids
Continuous integration for androids
Kirill Zotin
Seminar on android app development
Seminar on android app development
AbhishekKumar4779
Android studio&Gradle&Autotest
Android studio&Gradle&Autotest
毅 方
Android Attacks
Android Attacks
Michael Scovetta
Android Platform Architecture
Android Platform Architecture
Naresh Chintalcheru
Android_Studio_Structure.docx
Android_Studio_Structure.docx
KNANTHINIMCA
Android Development in a Nutshell
Android Development in a Nutshell
Aleix Solé
Android ndk
Android ndk
Sentinel Solutions Ltd
Android NDK
Android NDK
Sentinel Solutions Ltd
Android Application Development Using Java
Android Application Development Using Java
amaankhan
Android
Android
Lina Shamiah
Similar to Backwards Compatibility: Strategies and Tactics
(20)
Securing User Data with SQLCipher
Securing User Data with SQLCipher
App Integration (Revised and Updated)
App Integration (Revised and Updated)
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
App integration: Strategies and Tactics
App integration: Strategies and Tactics
Android workshop material
Android workshop material
From Android to the Mobile Web
From Android to the Mobile Web
What's New in Jelly Bean
What's New in Jelly Bean
Gl android platform
Gl android platform
Android My Seminar
Android My Seminar
Continuous integration for androids
Continuous integration for androids
Seminar on android app development
Seminar on android app development
Android studio&Gradle&Autotest
Android studio&Gradle&Autotest
Android Attacks
Android Attacks
Android Platform Architecture
Android Platform Architecture
Android_Studio_Structure.docx
Android_Studio_Structure.docx
Android Development in a Nutshell
Android Development in a Nutshell
Android ndk
Android ndk
Android NDK
Android NDK
Android Application Development Using Java
Android Application Development Using Java
Android
Android
More from CommonsWare
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
CommonsWare
The Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
Not Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
Maps V2... And You!
Maps V2... And You!
CommonsWare
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
CommonsWare
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
CommonsWare
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
X Means Y
X Means Y
CommonsWare
The Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
CommonsWare
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
CommonsWare
AppsWorld Keynote
AppsWorld Keynote
CommonsWare
Rich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
CommonsWare
Google TV For Fun
Google TV For Fun
CommonsWare
More from CommonsWare
(20)
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
The Action Bar: Front to Back
The Action Bar: Front to Back
Android Security: Defending Your Users
Android Security: Defending Your Users
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
Not Quite As Painful Threading
Not Quite As Painful Threading
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
Maps V2... And You!
Maps V2... And You!
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
X Means Y
X Means Y
The Wonderful World of Wearables
The Wonderful World of Wearables
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
AppsWorld Keynote
AppsWorld Keynote
Rich Text Editing and Beyond
Rich Text Editing and Beyond
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
Google TV For Fun
Google TV For Fun
Recently uploaded
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
jimielynbastida
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
MarianaLemus7
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
ngoud9212
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
null - The Open Security Community
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Recently uploaded
(20)
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Backwards Compatibility: Strategies and Tactics
1.
AnDevCon III
Backwards Compatibility: Strategies and Tactics Copyright © 2012 CommonsWare, LLC
2.
Device Mix
image Copyright © 2012 Google, Inc. – reprinted with permission Copyright © 2012 CommonsWare, LLC
3.
Device Mix
● The Market Is Not the World ● Kindle Fire ● NOOK Tablet ● Wearables (WIMM, I'm Watch, etc.) ● Miscellaneous non-Market devices ● If You Distribute to These, Take Their Versions Into Account! Copyright © 2012 CommonsWare, LLC
4.
Device Mix
● Predictions Sure To Go Wrong ● November 2012: ICS and newer reaches majority status – New device sales – Upgrades for existing devices ● December 2012: Mayan Apocalypse ● April 2013: Android 2.x below 20% ● September 2013: Android 2.x below 5% ● December 2013: Ragnarök Copyright © 2012 CommonsWare, LLC
5.
Competing Strategies
● Old API-Centric ● Lowest common denominator ● Today: Android 2.3, maybe 2.2 ● Only deal with newer things when unavoidable ● New API-Centric ● More aggressively support newer capabilities – Particularly with respect to UI ● Today: ICS ● Gracefully degrade for older devices Copyright © 2012 CommonsWare, LLC
6.
Forwards, Not Backwards
● Older Ain't Gettin' Any Bigger ● Aim for the increasing market share, not the decreasing share ● Sneezers' Devices ● Bloggers, media, etc. ● Tend towards newer devices ● If you look stale, may impact their interest in you Copyright © 2012 CommonsWare, LLC
7.
Forwards, Not Backwards
● Distinctive, Not Decomposing ● Are there new features that can give you a competitive edge? – Even if not all the users can take advantage of them ● It's the Way the (Web) World Works ● IE6-only versus graceful degradation ● Well-trod path, needing Android-specific tactics Copyright © 2012 CommonsWare, LLC
8.
Targets and Strategies
● Old API-Centric ● Build target = min SDK version = lowest common denominator ● Target SDK version no higher than min SDK version ● New API-Centric ● Build target = oldest version that has everything you are using directly (or via library) ● Min SDK version = oldest you are supporting ● Target SDK version = current-ish Android version Copyright © 2012 CommonsWare, LLC
9.
Validating Compatibility
● Compile-Time: Lint ● Keep your Android SDK tools/ADT updated! ● Will warn you when you try using newer stuff on older minSdkVersion – Requires manual lint run from Eclipse menu ● Use annotations to suppress warnings – @TargetApi(NN) Copyright © 2012 CommonsWare, LLC
10.
Validating Compatibility
● Testing ● Directly via emulator ● Directly via available hardware ● Bulk-testing Services – TestDroid Cloud – LessPainful – Apkudo – Etc. Copyright © 2012 CommonsWare, LLC
11.
Libraries for Compatibility
● Android Support Package ● Fragments – Large subset, but not everything from native API Level 11+ ● Loaders ● GridLayout ● *Compat Classes – Access to newer constants – Helper methods to get at newer capabilities while gracefully degrading to no-ops/defaults ● Separate Implementations Copyright © 2012 CommonsWare, LLC
12.
Libraries for Compatibility
● Action Bar Sherlock ● Implementation of ActionBar for Android 2.x ● Same API as native API Level 11+ ● Nine Old Androids ● Implementation of android.animation framework for Android 1.x/2.x Copyright © 2012 CommonsWare, LLC
13.
Ad-Hoc Backports
● Find AOSP Code, Clone, Fix ● New widgets (e.g., Switch) ● Other stuff largely separable from firmware ● Challenges – Finding resources – Dealing with package-private methods Copyright © 2012 CommonsWare, LLC
14.
Library/Backport Strategy
● Use as Temporary Scaffolding ● Know which API levels a given library or backport is addressing ● May vary by what you are using ● Remove In Time ● Once you no longer are supporting the older API levels, drop the scaffold and re-test Copyright © 2012 CommonsWare, LLC
15.
Java Version Guards
● Android 2.x+ ● Wrap any references to items from newer API level in a test of the API level if (Build.VERSION.SDK_INT>Build.VERSION_CODES.GINGERBREAD) { // do something } Copyright © 2012 CommonsWare, LLC
16.
Java Version Guards
● Android 2.x+ ● Wrap any references to items from newer API level in a test of the API level if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.GINGERBREAD) { @TargetApi(11) // do something needing API Level 11+ } Copyright © 2012 CommonsWare, LLC
17.
Java Version Guards
● Scenario: AsyncTask ● Serialized if targetSdkVersion >= 14 ● Use executeOnExecutor() to force to classic thread pool model ● Problem: executeOnExecutor() new to API Level 11 ● Solution: version guard block Copyright © 2012 CommonsWare, LLC
18.
Java Version Guards
● Android 1.x ● Problem: Dalvik complains if you load a class that refers to items from a newer API level ● Solution – Isolate newer-API items in a separate helper class – Only refer to that helper class within a version guard block Copyright © 2012 CommonsWare, LLC
19.
Java Version Guards
● The Old API-Centric Approach ● Use version guard to detect newer API level ● Use reflection to access items that only exist at that API level ● Benefit: can leave build target on older API level – Build target only affects what you directly reference Copyright © 2012 CommonsWare, LLC
20.
Versioned Resources
● Use -vNN Resource Set Suffix ● Apply to resources valid for API Level NN and higher ● Scenario – res/values/ = good for anything – res/values-v11/ = good for Honeycomb and newer ● Example – Style in -v11 that references Theme.Holo – Style with same name in default directory that does not reference Theme.Holo Copyright © 2012 CommonsWare, LLC
21.
Versioned Components
● Components Valid for Certain API Levels ● Activity only needed on Android 3.1+ ● Different app widgets for API Level 11, older devices ● Technique ● Boolean resource, contained in two resource sets – Default plus -vNN set ● Use boolean resource in android:enabled attribute in manifest – Disabled components do not show up anywhere Copyright © 2012 CommonsWare, LLC
22.
Scenario: Preferences
● Goals ● Want to use PreferenceFragments and headers on API Level 11 and higher ● Want preferences to still work on Android 2.x ● Option #1: Different PreferenceActivity Classes ● Use versioned components trick to dictate which one is available ● Use action, not component, in launching Intent ● Reuse preference XML as best you can Copyright © 2012 CommonsWare, LLC
23.
Scenario: Preferences
● Option #2: Version Guards ● One PreferenceActivity ● onBuildHeaders() only called on API Level 11+ ● Reuse preference XML as best you can ● Option #3: Backport ● Find current implementation (source, resources) ● Convert to use Android Support fragments ● Most difficulty, but consistent implementation, look-and-feel Copyright © 2012 CommonsWare, LLC
24.
QOTD “You’re
a Web developer in Java” is the first thing I tell every person mentioning fragmentation. There are no tablets. There are no phones. There’s no Google TV. There is only an unlimited set of configurations of every conceivable feature. Write your application in a dynamic, progressively enhancing manner that follows well- documented patterns and you will be just fine. Jake Wharton Copyright © 2012 CommonsWare, LLC
Download now