The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Supporting External Displays

Android 4.2 inaugurated support for applications to control what appears on an external or “secondary” display (e.g., TV connected via HDMI), replacing the default screen mirroring. This is largely handled through a Presentation object, where you declare the UI that goes onto the external display, in parallel with whatever your activity might be displaying on the primary screen.

In this chapter, we will review how Android supports these external displays, how you can find out if an external display is attached, and how you can use Presentation objects to control what is shown on that external display.

The author would like to thank Mark Allison, whose “Multiple Screens” blog post series helped to blaze the trail for everyone in this space.

Prerequisites

In addition to the core chapters, you should read the chapter on dialogs and the chapter on MediaRouter before reading this chapter.

A History of External Displays

The preview of this section was lost due to a rupture in the space-time continuum.

What is a Presentation?

The preview of this section is in an invisible, microscopic font.

Playing with External Displays

The preview of this section was lost due to a rupture in the space-time continuum.

Detecting Displays

The preview of this section was lost due to a rupture in the space-time continuum.

A Simple Presentation

The preview of this section was lost due to a rupture in the space-time continuum.

A Simpler Presentation

The preview of this section is being chased by zombies.

Presentations and Configuration Changes

The preview of this section was abducted by space aliens.

Presentations as Fragments

The preview of this section is in the process of being translated from its native Klingon.

Another Sample Project: Slides

The preview of this section was fed to a gremlin, after midnight.

Device Support for Presentation

The preview of this section is sleeping in.

Presentations from a Service

The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.

Hey, What About Chromecast?

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.