SlideShare a Scribd company logo
Second-Screen
  Support in
 Android 4.2
    Copyright © 2013 CommonsWare, LLC
Who's On Second?
●   Auxiliary screen
●   Inconsistently available
●   Display-only (no touchscreen)
●   Not:
    –   Simply being on a TV (think OUYA)
    –   Devices with dual primary displays (SONY Tablet
        P)
                      Copyright © 2013 CommonsWare, LLC
The Wayback Machine
●   Android 1.0 through 2.3
    –   Generally nothing
    –   Sporadic device-specific support (e.g., HTC DROID
        Incredible and composite output)
●   Android 3.0 through 4.1
    –   Mirroring
    –   Some limited developer control (video players)
●   Android 4.2: Developer Control
                        Copyright © 2013 CommonsWare, LLC
Getting To Second
●   HDMI
●   Mobile High-Definition Link (MHL)
●   Proprietary Cable
●   Miracast
    –   WifiDirect-based display protocol
    –   “Samsung All-Share Cast” on select Galaxy devices
    –   Added to core OS in Android 4.2, seen on Nexus 4

                        Copyright © 2013 CommonsWare, LLC
Not All Screens Are Created Equal
●   Key Differences
    –   Size (720p, 1080p, etc.)
    –   Density (tvdpi, hdpi, etc.)
●   Net: Different Context for Different Display
    –   Inflate layouts, load resources, etc. using proper
        Context to get the right ones for the targeted
        display

                       Copyright © 2013 CommonsWare, LLC
I Can Haz Second Screen?
●   DisplayManager
    –   System service (DISPLAY_SERVICE)
    –   getDisplays() (all or those in a category, like
        DISPLAY_CATEGORY_PRESENTATION)
    –   registerDisplayListener() to find out
        about changes in mix of displays
    –   New to API Level 17


                      Copyright © 2013 CommonsWare, LLC
I Can Haz Second Screen?
●   MediaRouter
    –   System service (MEDIA_ROUTER_SERVICE)
    –   More general: find preferred “route” for audio or
        video
    –   getSelectedRoute() to find the route to be
        used right now (ROUTE_TYPE_LIVE_VIDEO)
    –   addCallback() to find out route changes
    –   Added in API Level 16
                       Copyright © 2013 CommonsWare, LLC
Presentation: Getting Meta
●   Presentation
    –   Subclass of Dialog, added in API Level 17
    –   Override onCreate(), call
        setContentView()
    –   Supplies Context suitable for use with
        designated Display
    –   When displayed using show(), appears on
        designated Display
                      Copyright © 2013 CommonsWare, LLC
No, I Can Haz Second Screen?
●   Testing Options
    –   Actual “second screen”
    –   Simulated secondary display
         ●   Developer Options → Simulate secondary displays
         ●   Works well with hardware, less so with x86 emulator




                          Copyright © 2013 CommonsWare, LLC
Copyright © 2013 CommonsWare, LLC
Copyright © 2013 CommonsWare, LLC
Ack! Too Many Options!
●   Must Have Second Screen
    –   Presentation-specific app
●   Optional, Dedicated UX
    –   Game using second screen for primary output,
        device screen for control surface and secondary
        output
●   Optional, Using Fragments
    –   Push stuff to second screen or show “inline”
                      Copyright © 2013 CommonsWare, LLC
Fragments of a Presentation
●   Good News!
    –   Presentation extends Dialog, so
        DialogFragment works
    –   DialogFragment supports either show-as-
        dialog or show-as-regular-fragment
●   Bad News!
    –   Since different Contexts, cannot use the same
        DialogFragment instance for each
                      Copyright © 2013 CommonsWare, LLC
Copyright © 2013 CommonsWare, LLC
A Modicum of Control, Please
●   Second Screen: Not a Touchscreen
    –   Whatever shows on second screen is driven and
        controlled by what is on the primary screen
●   Example: Video Player
    –   Second screen shows the video playback
    –   Primary screen has play/pause, fast-forward,
        rewind, SeekBar, IMDB content, chat screen, etc.

                      Copyright © 2013 CommonsWare, LLC
A Modicum of Control, Please
●   Separate Fragments/Views
    –   One for what is shown
    –   One for controlling what is shown
●   Mirroring Content
    –   Same fragment/view, shown on both displays,
        controlled by primary screen




                        Copyright © 2013 CommonsWare, LLC
Present Imperfect
●   Activity-Based
    –   Presentation extends Dialog, must have an
        activity to show a Dialog
    –   Cannot have second screen driven by service,
        with primary screen running something
        independent
    –   Samsung, multi-window apps, and second
        screens?

                      Copyright © 2013 CommonsWare, LLC
Present Imperfect
●   Activity-Based
    –   Must dismiss() Presentation as part of
        switching to a new activity → flicker
         ●   Briefly shows mirroring before new Presentation
             appears
    –   Similar flicker if you try switching from one
        Presentation to another


                         Copyright © 2013 CommonsWare, LLC
Odd Possibilities
●   Exercise Equipment
    –   Equipment screen serves as external display for
        Android device
●   Smart Watches
    –   Miracast to monitors, TVs, etc., with watch face
        serving as control surface



                      Copyright © 2013 CommonsWare, LLC
Predictions, Sure To Go Wrong
●   Demise of Google TV
    –   Greater emphasis on Miracast and kin
    –   Parts cost cheaper for TVs
●   Wireless Display Standards Fight
    –   Apple AirPlay Mirroring, WiDi, WirelessHD, etc.
●   Manufacturers Pushing the Envelope
    –   Samsung and a multi-window extension
                      Copyright © 2013 CommonsWare, LLC
Q&A

Copyright © 2013 CommonsWare, LLC

More Related Content

What's hot

Quick guide to cuban spanish (Book Preview)
Quick guide to cuban spanish (Book Preview)Quick guide to cuban spanish (Book Preview)
Quick guide to cuban spanish (Book Preview)
Speaking Latino
 
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring InsightSplunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk
 
Android - Wakelock detector
Android - Wakelock detector Android - Wakelock detector
Android - Wakelock detector
Hikmat Abdoollayev
 
Android power management
Android power managementAndroid power management
Android power managementJerrin George
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
Opersys inc.
 
BKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack UpdateBKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack Update
Linaro
 
UI Customization in AEM 6.0
UI Customization in AEM 6.0UI Customization in AEM 6.0
UI Customization in AEM 6.0
Gilles Knobloch
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developers
Hassan Abid
 

What's hot (8)

Quick guide to cuban spanish (Book Preview)
Quick guide to cuban spanish (Book Preview)Quick guide to cuban spanish (Book Preview)
Quick guide to cuban spanish (Book Preview)
 
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring InsightSplunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
 
Android - Wakelock detector
Android - Wakelock detector Android - Wakelock detector
Android - Wakelock detector
 
Android power management
Android power managementAndroid power management
Android power management
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
BKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack UpdateBKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack Update
 
UI Customization in AEM 6.0
UI Customization in AEM 6.0UI Customization in AEM 6.0
UI Customization in AEM 6.0
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developers
 

Viewers also liked

Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidXavier Hallade
 
Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on android
Li SUN
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen android
Chaiwoot Phrombutr
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
Angelo Rüggeberg
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
BeMyApp
 
How to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native ActivityHow to Use OpenGL/ES on Native Activity
Investigation report on 64 bit support in Android Open Source Project
Investigation report on 64 bit support in Android Open Source ProjectInvestigation report on 64 bit support in Android Open Source Project
Investigation report on 64 bit support in Android Open Source Project
hidenorly
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
DroidConTLV
 
Logging system of Android
Logging system of AndroidLogging system of Android
Logging system of Android
Tetsuyuki Kobayashi
 
IOMX in Android
IOMX in AndroidIOMX in Android
IOMX in Android
Raghavan Venkateswaran
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
National Cheng Kung University
 
64-bit Android
64-bit Android64-bit Android
64-bit Android
Chiou-Nan Chen
 
Screen orientations in android
Screen orientations in androidScreen orientations in android
Screen orientations in android
manjakannar
 
Guide to Open Source Compliance
Guide to Open Source ComplianceGuide to Open Source Compliance
Guide to Open Source Compliance
Samsung Open Source Group
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
Chris Simmonds
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
Opersys inc.
 
Practical steps to mitigate DDoS attacks
Practical steps to mitigate DDoS attacksPractical steps to mitigate DDoS attacks
Practical steps to mitigate DDoS attacks
Security Session
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
National Cheng Kung University
 
PRESENTATION ON MIRROR LINK
PRESENTATION ON MIRROR LINKPRESENTATION ON MIRROR LINK
PRESENTATION ON MIRROR LINK
PraDeep SiNgh PaRihar
 
Building AR and VR Experiences
Building AR and VR ExperiencesBuilding AR and VR Experiences
Building AR and VR Experiences
Mark Billinghurst
 

Viewers also liked (20)

Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on android
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen android
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
How to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native ActivityHow to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native Activity
 
Investigation report on 64 bit support in Android Open Source Project
Investigation report on 64 bit support in Android Open Source ProjectInvestigation report on 64 bit support in Android Open Source Project
Investigation report on 64 bit support in Android Open Source Project
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
Logging system of Android
Logging system of AndroidLogging system of Android
Logging system of Android
 
IOMX in Android
IOMX in AndroidIOMX in Android
IOMX in Android
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
64-bit Android
64-bit Android64-bit Android
64-bit Android
 
Screen orientations in android
Screen orientations in androidScreen orientations in android
Screen orientations in android
 
Guide to Open Source Compliance
Guide to Open Source ComplianceGuide to Open Source Compliance
Guide to Open Source Compliance
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
Practical steps to mitigate DDoS attacks
Practical steps to mitigate DDoS attacksPractical steps to mitigate DDoS attacks
Practical steps to mitigate DDoS attacks
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
PRESENTATION ON MIRROR LINK
PRESENTATION ON MIRROR LINKPRESENTATION ON MIRROR LINK
PRESENTATION ON MIRROR LINK
 
Building AR and VR Experiences
Building AR and VR ExperiencesBuilding AR and VR Experiences
Building AR and VR Experiences
 

Similar to Second-Screen Support in Android 4.2

Google TV For Fun
Google TV For FunGoogle TV For Fun
Google TV For Fun
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
 
Google TV: Thoughts From Left Field
Google TV: Thoughts From Left FieldGoogle TV: Thoughts From Left Field
Google TV: Thoughts From Left Field
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
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
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
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
CommonsWare
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
Alexander Wilhelm
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
 
Optimizing your Android App for Mass Market Devices
Optimizing your Android App for Mass Market DevicesOptimizing your Android App for Mass Market Devices
Optimizing your Android App for Mass Market DevicesMotorola Mobility - MOTODEV
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screenHeinrich Seeger
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
 
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
Sunita Singh
 
X Means Y
X Means YX Means Y
X Means Y
CommonsWare
 
Lecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptxLecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptx
Yousef Alamir
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
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
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
 

Similar to Second-Screen Support in Android 4.2 (20)

Google TV For Fun
Google TV For FunGoogle TV For Fun
Google TV For Fun
 
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
 
Google TV: Thoughts From Left Field
Google TV: Thoughts From Left FieldGoogle TV: Thoughts From Left Field
Google TV: Thoughts From Left Field
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
 
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
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
 
Android Development Tutorial V3
Android Development Tutorial   V3Android Development Tutorial   V3
Android Development Tutorial V3
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
 
Optimizing your Android App for Mass Market Devices
Optimizing your Android App for Mass Market DevicesOptimizing your Android App for Mass Market Devices
Optimizing your Android App for Mass Market Devices
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screen
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
 
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
 
X Means Y
X Means YX Means Y
X Means Y
 
Lecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptxLecture 01: Introduction into Android.pptx
Lecture 01: Introduction into Android.pptx
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
 
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
 

More from 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
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
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
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
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
 
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
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
CommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich 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... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
CommonsWare
 
If I Were Starting Now
If I Were Starting NowIf I Were Starting Now
If I Were Starting Now
CommonsWare
 
Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)
CommonsWare
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
CommonsWare
 
Android Library Projects
Android Library ProjectsAndroid Library Projects
Android Library Projects
CommonsWare
 

More from CommonsWare (17)

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
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
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
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
 
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
 
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
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
 
If I Were Starting Now
If I Were Starting NowIf I Were Starting Now
If I Were Starting Now
 
Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
 
Android Library Projects
Android Library ProjectsAndroid Library Projects
Android Library Projects
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
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
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
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
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
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
 
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
 
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
 
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
 
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
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
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
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
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 !
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
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...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
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
 
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...
 
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
 
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...
 
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
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
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
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

Second-Screen Support in Android 4.2

  • 1. Second-Screen Support in Android 4.2 Copyright © 2013 CommonsWare, LLC
  • 2. Who's On Second? ● Auxiliary screen ● Inconsistently available ● Display-only (no touchscreen) ● Not: – Simply being on a TV (think OUYA) – Devices with dual primary displays (SONY Tablet P) Copyright © 2013 CommonsWare, LLC
  • 3. The Wayback Machine ● Android 1.0 through 2.3 – Generally nothing – Sporadic device-specific support (e.g., HTC DROID Incredible and composite output) ● Android 3.0 through 4.1 – Mirroring – Some limited developer control (video players) ● Android 4.2: Developer Control Copyright © 2013 CommonsWare, LLC
  • 4. Getting To Second ● HDMI ● Mobile High-Definition Link (MHL) ● Proprietary Cable ● Miracast – WifiDirect-based display protocol – “Samsung All-Share Cast” on select Galaxy devices – Added to core OS in Android 4.2, seen on Nexus 4 Copyright © 2013 CommonsWare, LLC
  • 5. Not All Screens Are Created Equal ● Key Differences – Size (720p, 1080p, etc.) – Density (tvdpi, hdpi, etc.) ● Net: Different Context for Different Display – Inflate layouts, load resources, etc. using proper Context to get the right ones for the targeted display Copyright © 2013 CommonsWare, LLC
  • 6. I Can Haz Second Screen? ● DisplayManager – System service (DISPLAY_SERVICE) – getDisplays() (all or those in a category, like DISPLAY_CATEGORY_PRESENTATION) – registerDisplayListener() to find out about changes in mix of displays – New to API Level 17 Copyright © 2013 CommonsWare, LLC
  • 7. I Can Haz Second Screen? ● MediaRouter – System service (MEDIA_ROUTER_SERVICE) – More general: find preferred “route” for audio or video – getSelectedRoute() to find the route to be used right now (ROUTE_TYPE_LIVE_VIDEO) – addCallback() to find out route changes – Added in API Level 16 Copyright © 2013 CommonsWare, LLC
  • 8. Presentation: Getting Meta ● Presentation – Subclass of Dialog, added in API Level 17 – Override onCreate(), call setContentView() – Supplies Context suitable for use with designated Display – When displayed using show(), appears on designated Display Copyright © 2013 CommonsWare, LLC
  • 9. No, I Can Haz Second Screen? ● Testing Options – Actual “second screen” – Simulated secondary display ● Developer Options → Simulate secondary displays ● Works well with hardware, less so with x86 emulator Copyright © 2013 CommonsWare, LLC
  • 10. Copyright © 2013 CommonsWare, LLC
  • 11. Copyright © 2013 CommonsWare, LLC
  • 12. Ack! Too Many Options! ● Must Have Second Screen – Presentation-specific app ● Optional, Dedicated UX – Game using second screen for primary output, device screen for control surface and secondary output ● Optional, Using Fragments – Push stuff to second screen or show “inline” Copyright © 2013 CommonsWare, LLC
  • 13. Fragments of a Presentation ● Good News! – Presentation extends Dialog, so DialogFragment works – DialogFragment supports either show-as- dialog or show-as-regular-fragment ● Bad News! – Since different Contexts, cannot use the same DialogFragment instance for each Copyright © 2013 CommonsWare, LLC
  • 14. Copyright © 2013 CommonsWare, LLC
  • 15. A Modicum of Control, Please ● Second Screen: Not a Touchscreen – Whatever shows on second screen is driven and controlled by what is on the primary screen ● Example: Video Player – Second screen shows the video playback – Primary screen has play/pause, fast-forward, rewind, SeekBar, IMDB content, chat screen, etc. Copyright © 2013 CommonsWare, LLC
  • 16. A Modicum of Control, Please ● Separate Fragments/Views – One for what is shown – One for controlling what is shown ● Mirroring Content – Same fragment/view, shown on both displays, controlled by primary screen Copyright © 2013 CommonsWare, LLC
  • 17. Present Imperfect ● Activity-Based – Presentation extends Dialog, must have an activity to show a Dialog – Cannot have second screen driven by service, with primary screen running something independent – Samsung, multi-window apps, and second screens? Copyright © 2013 CommonsWare, LLC
  • 18. Present Imperfect ● Activity-Based – Must dismiss() Presentation as part of switching to a new activity → flicker ● Briefly shows mirroring before new Presentation appears – Similar flicker if you try switching from one Presentation to another Copyright © 2013 CommonsWare, LLC
  • 19. Odd Possibilities ● Exercise Equipment – Equipment screen serves as external display for Android device ● Smart Watches – Miracast to monitors, TVs, etc., with watch face serving as control surface Copyright © 2013 CommonsWare, LLC
  • 20. Predictions, Sure To Go Wrong ● Demise of Google TV – Greater emphasis on Miracast and kin – Parts cost cheaper for TVs ● Wireless Display Standards Fight – Apple AirPlay Mirroring, WiDi, WirelessHD, etc. ● Manufacturers Pushing the Envelope – Samsung and a multi-window extension Copyright © 2013 CommonsWare, LLC
  • 21. Q&A Copyright © 2013 CommonsWare, LLC