SlideShare a Scribd company logo
Secondary Screen
Support Using
DisplayManager
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
Getting To Second: Sending
●

HDMI

●

Mobile High-Definition Link (MHL, SlimPort)

●

Proprietary Cable

●

Miracast/AllShare Cast
–

WifiDirect-based display protocol

–

Available on many modern devices, including most of
the Samsung Galaxy line
Copyright © 2013 CommonsWare, LLC
Getting to Second: Receiving
●

HDMI
–
–

●

Direct
Via MHL adapter

Miracast/AllShare Cast
–

Direct (e.g., most of Samsung Smart TVs)

–

Via HDMI adapter

Copyright © 2013 CommonsWare, LLC
Secondary Display: What Is Shown
●

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
–

At least for devices that shipped with 4.2+
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
Exerting Your Control
●

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
Exerting Your Control
●

CWAC-Presentation and PresentationHelper
–

Lets you know when a secondary display
becomes available or goes away

–

Usage
●

Create instance

●

Supply a Context and a Listener

●

Forward onPause() / onResume()

●

Implement showPreso() /
clearPreso()
Copyright © 2013 CommonsWare, LLC
Trying It Out
●

Testing Options
–

Actual “secondary 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
Low-Level Exertion
●

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
Low-Level Exertion
●

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
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
Secondary Screen Strategies
●

Secondary Screen: Not a Touchscreen
–

●

Whatever shows on secondary 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
Secondary Screen Strategies
●

Must Have Secondary Screen
–

●

Optional, Dedicated UX
–

●

Presentation-specific app
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
Secondary Screen Tactics
●

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
Limitations and Annoyances
●

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 secondary
screens?
Copyright © 2013 CommonsWare, LLC
Limitations and Annoyances
●

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

–

General rule: one activity and one
Presentation, just updating content
Copyright © 2013 CommonsWare, LLC
Ad

More Related Content

What's hot (20)

Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
Emertxe Information Technologies Pvt Ltd
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
National Cheng Kung University
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
Linaro
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
Emertxe Information Technologies Pvt Ltd
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
Emertxe Information Technologies Pvt Ltd
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
Nanik Tolaram
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015
Rafael Coutinho
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
Ashish Agrawal
 
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-ReloadedRNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
Christoph Adler
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
Linaro
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Opersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
Opersys inc.
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
Yong Heui Cho
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Bin Chen
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
Linaro
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
Chris Simmonds
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
Chethan Pchethan
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
Opersys inc.
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
Yu-Hsin Hung
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
Linaro
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
Nanik Tolaram
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015
Rafael Coutinho
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
Ashish Agrawal
 
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-ReloadedRNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
RNUG - HCL Notes 11.0.1 FP2 — Performance Boost Re-Reloaded
Christoph Adler
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
Linaro
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Opersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
Opersys inc.
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
Yong Heui Cho
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Bin Chen
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
Linaro
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
Chris Simmonds
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
Chethan Pchethan
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
Opersys inc.
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
Yu-Hsin Hung
 

Viewers also liked (20)

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
 
Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on android
Li SUN
 
Iniciando no desenvolvimento android 2016
Iniciando no desenvolvimento android 2016Iniciando no desenvolvimento android 2016
Iniciando no desenvolvimento android 2016
Jose Naves Moura Neto
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
Angelo Rüggeberg
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen android
Chaiwoot Phrombutr
 
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
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
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
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
National Cheng Kung University
 
Troubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized ControllersTroubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized Controllers
Cisco Mobility
 
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
 
Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on android
Li SUN
 
Iniciando no desenvolvimento android 2016
Iniciando no desenvolvimento android 2016Iniciando no desenvolvimento android 2016
Iniciando no desenvolvimento android 2016
Jose Naves Moura Neto
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
Angelo Rüggeberg
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen android
Chaiwoot Phrombutr
 
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
 
Screen orientations in android
Screen orientations in androidScreen orientations in android
Screen orientations in android
manjakannar
 
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
 
Troubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized ControllersTroubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized Controllers
Cisco Mobility
 
Ad

Similar to Secondary Screen Support Using DisplayManager (20)

Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller API
Samsung Open Source Group
 
Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller API
Samsung Open Source Group
 
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
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screen
Heinrich Seeger
 
The future of WebRTC - Sept 2021
The future of WebRTC - Sept 2021The future of WebRTC - Sept 2021
The future of WebRTC - Sept 2021
Arnaud BUDKIEWICZ
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
GDG Saint Petersburg
 
Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment
a8us
 
CDS Cloud Network Media Player
CDS Cloud Network Media Player CDS Cloud Network Media Player
CDS Cloud Network Media Player
Chris Bartram, Digital Displays Specialist
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
Amir Zmora
 
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
Ajiro Ndi
 
Multimedia networking
Multimedia networkingMultimedia networking
Multimedia networking
Kikima Jimmy
 
Hitting a moving target: achieving mobile inclusion
Hitting a moving target: achieving mobile inclusionHitting a moving target: achieving mobile inclusion
Hitting a moving target: achieving mobile inclusion
Jon Gibbins
 
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
Motorola Mobility - MOTODEV
 
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 presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 
A Guide to the Top Cross Platform Video Players
A Guide to the Top Cross Platform Video PlayersA Guide to the Top Cross Platform Video Players
A Guide to the Top Cross Platform Video Players
Roshan Dwivedi
 
Android Live Streaming Box Technical
Android Live Streaming Box Technical Android Live Streaming Box Technical
Android Live Streaming Box Technical
Jimmin Kurichiyil
 
Mis Presentation Quest
Mis Presentation  QuestMis Presentation  Quest
Mis Presentation Quest
Devdut Saha
 
160811_오토테크컨퍼런스_vault micro
160811_오토테크컨퍼런스_vault micro160811_오토테크컨퍼런스_vault micro
160811_오토테크컨퍼런스_vault micro
StartupAlliance
 
Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller API
Samsung Open Source Group
 
Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller API
Samsung Open Source Group
 
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
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screen
Heinrich Seeger
 
The future of WebRTC - Sept 2021
The future of WebRTC - Sept 2021The future of WebRTC - Sept 2021
The future of WebRTC - Sept 2021
Arnaud BUDKIEWICZ
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
GDG Saint Petersburg
 
Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment
a8us
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
Amir Zmora
 
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
IGCSE ICT - Types and Components of Computer Systems - Operating Systems - Aj...
Ajiro Ndi
 
Multimedia networking
Multimedia networkingMultimedia networking
Multimedia networking
Kikima Jimmy
 
Hitting a moving target: achieving mobile inclusion
Hitting a moving target: achieving mobile inclusionHitting a moving target: achieving mobile inclusion
Hitting a moving target: achieving mobile inclusion
Jon Gibbins
 
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
Motorola Mobility - MOTODEV
 
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 presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 
A Guide to the Top Cross Platform Video Players
A Guide to the Top Cross Platform Video PlayersA Guide to the Top Cross Platform Video Players
A Guide to the Top Cross Platform Video Players
Roshan Dwivedi
 
Android Live Streaming Box Technical
Android Live Streaming Box Technical Android Live Streaming Box Technical
Android Live Streaming Box Technical
Jimmin Kurichiyil
 
Mis Presentation Quest
Mis Presentation  QuestMis Presentation  Quest
Mis Presentation Quest
Devdut Saha
 
160811_오토테크컨퍼런스_vault micro
160811_오토테크컨퍼런스_vault micro160811_오토테크컨퍼런스_vault micro
160811_오토테크컨퍼런스_vault micro
StartupAlliance
 
Ad

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
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
 
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
 
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
 
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
 
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
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
 
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
 
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
 
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
 
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
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
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
 
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
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
 

Recently uploaded (20)

Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 

Secondary Screen Support Using DisplayManager

  • 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. Getting To Second: Sending ● HDMI ● Mobile High-Definition Link (MHL, SlimPort) ● Proprietary Cable ● Miracast/AllShare Cast – WifiDirect-based display protocol – Available on many modern devices, including most of the Samsung Galaxy line Copyright © 2013 CommonsWare, LLC
  • 4. Getting to Second: Receiving ● HDMI – – ● Direct Via MHL adapter Miracast/AllShare Cast – Direct (e.g., most of Samsung Smart TVs) – Via HDMI adapter Copyright © 2013 CommonsWare, LLC
  • 5. Secondary Display: What Is Shown ● 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 – At least for devices that shipped with 4.2+ Copyright © 2013 CommonsWare, LLC
  • 6. 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
  • 7. Exerting Your Control ● 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
  • 8. Exerting Your Control ● CWAC-Presentation and PresentationHelper – Lets you know when a secondary display becomes available or goes away – Usage ● Create instance ● Supply a Context and a Listener ● Forward onPause() / onResume() ● Implement showPreso() / clearPreso() Copyright © 2013 CommonsWare, LLC
  • 9. Trying It Out ● Testing Options – Actual “secondary 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. Low-Level Exertion ● 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
  • 13. Low-Level Exertion ● 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
  • 14. 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
  • 15. Secondary Screen Strategies ● Secondary Screen: Not a Touchscreen – ● Whatever shows on secondary 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. Secondary Screen Strategies ● Must Have Secondary Screen – ● Optional, Dedicated UX – ● Presentation-specific app 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
  • 17. Secondary Screen Tactics ● 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
  • 18. Limitations and Annoyances ● 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 secondary screens? Copyright © 2013 CommonsWare, LLC
  • 19. Limitations and Annoyances ● 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 – General rule: one activity and one Presentation, just updating content Copyright © 2013 CommonsWare, LLC
  翻译: