SlideShare a Scribd company logo
Dealing with Different
          Devices


               
Objective: Minimal Redundancy
    ●   More code = more cost
        –   More development time initially
        –   Greater odds of bugs
        –   More maintenance over time
    ●   Aim for maximum targets with the least
        feasible code


                                    
Step #1: Identify Targets
    ●   Where Is Your App Really Going to be Used?
        –   Outside of US? Small screens popular
        –   Heavily dependent on mobile data? Tablets less
            likely, TVs pretty much out
    ●   Business-Focused Restrictions
        –   Distribution partners (e.g., OEM deals)
        –   Enterprise requirements

                                   
Step #2: High-Level UX Design
    ●   What Are the Major Functions?
        –   E.g., Gmail = labels, conversations, messages,
            composition
    ●   How Are the Functions Delivered?
        –   E.g., Gmail = one per screen on phones,
            combined on tablets
    ●   What Functional Differences Are There?
        –   E.g., something only on tablets
                                   
Step #3: ID Reusable Portions
    ●   Where Are You Combining Things?
        –   Tablet screen = combination of multiple phone
            screens
        –   Only min0r differences in functionality, look and
            feel




                                   
Step #4: Apply Fragments
    ●   Fragments in an MVC World
        –   Models = POJOs, database+helper, whatever
        –   Views = widgets
        –   Controller = fragments
        –   Activities = orchestration




                                   
Step #4: Apply Fragments
              Activity A                 Activity C

Tablet
              1        2                     3




          Activity A       Activity B    Activity C


    TV        1                   2          3




                               
Step #4: Apply Fragments
    ●   Orchestration via Listeners
        –   Define interface for the event listener
        –   Activity supplies implementation to fragment
        –   Fragment calls listener methods as needed
        –   Activity responds
             ●   Dynamic fragment or reconfigure existing
                 fragment
             ●   Start an activity
                                       
Step #4: Apply Fragments
    ●   Hoped-For Outcomes
        –   Fragments directly usable in all screen sizes
             ●   1 per activity in small/normal screens
             ●   1+ per activity in large/xlarge screens
             ●   Fragment implementations oblivious to where other
                 fragments reside
        –   Views and models unaffected


                                         
Step #5: Tactical Considerations
    ●   Use density-independent dimensions
    ●   Use stretchable graphics
        –   ShapeDrawable
        –   Nine-patch PNGs
        –   SVG (via add-on library)




                                   
Step #5: Tactical Considerations
    ●   Tell Android where whitespace goes
        –   LinearLayout and android:layout_weight
        –   TableLayout and android:stretchColumns
        –   RelativeLayout and wise choice of rules
             ●   Get graphics designer to design with rules in mind!




                                        
Step #5: Tactical Considerations
    ●   Resource Set Strategy
        –   Drawables by Density
             ●   Want image to stay roughly the same size
        –   Layout by Screen Size
             ●   Apply appropriate fragments, sized and positioned
                 as needed
        –   Values by Density (dimensions)
        –   New in 3.2: minimum resolution resource sets
                                       
Step #5: Tactical Considerations
    ●   API Versions and Backwards Compatibility
        –   Class Detection
        –   Reflection
        –   Conditional Class Loading
             ●   Newer API only
             ●   Abstract class and multiple API concrete
                 implementations
        –   Why? For other tablet features
 
             ●   E.g., work with action  bar
Step #6: Testing
    ●   Emulators
    ●   Devices
        –   Owned
        –   Loaned (e.g., user group events, device labs at
            conferences)
        –   DeviceAnywhere and similar services
        –   Controlled beta test release

                                   
Alternative #1: Market Filtering
    ●   Upload Multiple APKs
        –   Each targeting a different device spec
    ●   Apply Market Filters
        –   APKs only delivered to devices on which it
            should work




                                   
Alternative #2: Manifest Filtering
    ●   <compatible-screens>
    ●   <supports-screens>
    ●   <uses-configuration>
    ●   <uses-feature>
    ●   <uses-sdk>



                                
Alternative #3: HTML5
    ●   Detect window size or user agent, use
        appropriate formatting
        –   Screen density can be a challenge
    ●   Use PhoneGap to convert into installable APK
    ●   Bonus: cross-platform
    ●   Cons: limited device integration, “non-native”
        feel
                                  

More Related Content

Similar to Android: Dealing with Different Devices

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump StartConFoo
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011
Opersys inc.
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
Tomáš Kypta
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015
Dominique Boutin
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
Opersys inc.
 
Latest trends in information technology
Latest trends in information technologyLatest trends in information technology
Latest trends in information technology
Eldos Kuriakose
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
Dominique Cimafranca
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
Andrew Ferrier
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
Platty Soft
 
Native vs HTML
Native vs HTMLNative vs HTML
Native vs HTMLludlola
 
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
NITHIN S.S
 
Language learning using augmented reality
Language learning using augmented realityLanguage learning using augmented reality
Language learning using augmented reality
Amritanshu Sawarn
 
Developer Experience to Testing
Developer Experience to TestingDeveloper Experience to Testing
Developer Experience to Testing
Mozaic Works
 
Facets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark MurphyFacets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark Murphy
Skills Matter
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
Reza Yogaswara
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
James Williams
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageXamarin
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
Yshay Yaacobi
 
CSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCoreCSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCoreAnwar Mohamed
 

Similar to Android: Dealing with Different Devices (20)

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Latest trends in information technology
Latest trends in information technologyLatest trends in information technology
Latest trends in information technology
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
 
Testing banking apps
Testing banking appsTesting banking apps
Testing banking apps
 
Native vs HTML
Native vs HTMLNative vs HTML
Native vs HTML
 
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
 
Language learning using augmented reality
Language learning using augmented realityLanguage learning using augmented reality
Language learning using augmented reality
 
Developer Experience to Testing
Developer Experience to TestingDeveloper Experience to Testing
Developer Experience to Testing
 
Facets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark MurphyFacets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark Murphy
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
CSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCoreCSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCore
 

More from CommonsWare

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting 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 AppsWhen 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 BackThe Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
 
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!
CommonsWare
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPager
CommonsWare
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-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 AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
 
X Means Y
X Means YX Means Y
X Means Y
CommonsWare
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
CommonsWare
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
CommonsWare
 

More from CommonsWare (20)

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting 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 AppsWhen 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 BackThe Action Bar: Front to Back
The Action Bar: Front to Back
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your Users
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPager
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
 
X Means Y
X Means YX Means Y
X Means Y
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Android: Dealing with Different Devices

  • 1. Dealing with Different Devices    
  • 2. Objective: Minimal Redundancy ● More code = more cost – More development time initially – Greater odds of bugs – More maintenance over time ● Aim for maximum targets with the least feasible code    
  • 3. Step #1: Identify Targets ● Where Is Your App Really Going to be Used? – Outside of US? Small screens popular – Heavily dependent on mobile data? Tablets less likely, TVs pretty much out ● Business-Focused Restrictions – Distribution partners (e.g., OEM deals) – Enterprise requirements    
  • 4. Step #2: High-Level UX Design ● What Are the Major Functions? – E.g., Gmail = labels, conversations, messages, composition ● How Are the Functions Delivered? – E.g., Gmail = one per screen on phones, combined on tablets ● What Functional Differences Are There? – E.g., something only on tablets    
  • 5. Step #3: ID Reusable Portions ● Where Are You Combining Things? – Tablet screen = combination of multiple phone screens – Only min0r differences in functionality, look and feel    
  • 6. Step #4: Apply Fragments ● Fragments in an MVC World – Models = POJOs, database+helper, whatever – Views = widgets – Controller = fragments – Activities = orchestration    
  • 7. Step #4: Apply Fragments Activity A  Activity C Tablet 1 2 3 Activity A Activity B  Activity C TV 1 2 3    
  • 8. Step #4: Apply Fragments ● Orchestration via Listeners – Define interface for the event listener – Activity supplies implementation to fragment – Fragment calls listener methods as needed – Activity responds ● Dynamic fragment or reconfigure existing fragment ● Start an activity    
  • 9. Step #4: Apply Fragments ● Hoped-For Outcomes – Fragments directly usable in all screen sizes ● 1 per activity in small/normal screens ● 1+ per activity in large/xlarge screens ● Fragment implementations oblivious to where other fragments reside – Views and models unaffected    
  • 10. Step #5: Tactical Considerations ● Use density-independent dimensions ● Use stretchable graphics – ShapeDrawable – Nine-patch PNGs – SVG (via add-on library)    
  • 11. Step #5: Tactical Considerations ● Tell Android where whitespace goes – LinearLayout and android:layout_weight – TableLayout and android:stretchColumns – RelativeLayout and wise choice of rules ● Get graphics designer to design with rules in mind!    
  • 12. Step #5: Tactical Considerations ● Resource Set Strategy – Drawables by Density ● Want image to stay roughly the same size – Layout by Screen Size ● Apply appropriate fragments, sized and positioned as needed – Values by Density (dimensions) – New in 3.2: minimum resolution resource sets    
  • 13. Step #5: Tactical Considerations ● API Versions and Backwards Compatibility – Class Detection – Reflection – Conditional Class Loading ● Newer API only ● Abstract class and multiple API concrete implementations – Why? For other tablet features   ● E.g., work with action  bar
  • 14. Step #6: Testing ● Emulators ● Devices – Owned – Loaned (e.g., user group events, device labs at conferences) – DeviceAnywhere and similar services – Controlled beta test release    
  • 15. Alternative #1: Market Filtering ● Upload Multiple APKs – Each targeting a different device spec ● Apply Market Filters – APKs only delivered to devices on which it should work    
  • 16. Alternative #2: Manifest Filtering ● <compatible-screens> ● <supports-screens> ● <uses-configuration> ● <uses-feature> ● <uses-sdk>    
  • 17. Alternative #3: HTML5 ● Detect window size or user agent, use appropriate formatting – Screen density can be a challenge ● Use PhoneGap to convert into installable APK ● Bonus: cross-platform ● Cons: limited device integration, “non-native” feel