PAUL SAXMAN: Hi, I'm Paul Saxman, and I'm a Senior
Developer Advocate at Google.
In this tutorial, I'll be giving you an overview of the
Google TV platform from a developer's perspective.
Specifically, I'll cover why you should consider developing
apps for connected TVs.
I'll talk about the main features of Google TV that
developers should be interested in.
And I'll tell you how to get started building
apps for the platform.
It's a really great time for developers to start building
apps for TVs, because it's an emerging market.
There's less competition and more room for creative ideas.
And there's still time for developers to establish
themselves in the smart TV space.
There are few statistics that capture where the connected TV
market is going, which should give you a sense of why you
should consider developing apps for TVs.
The first statistic, that I think is relevant, is that, in
the US, households have an average of 2.5
people and 2.93 TV sets.
And the average number of TV sets per household continues
to increase.
Whereas the average number of people has
remained relatively constant.
What's interesting about this statistic is that there are,
on average, more TVs than people in US homes.
This also likely means that people own more TVs than other
types of connected devices.
This is especially true for personal devices, such as
laptops, smartphones, and tablets.
Another interesting statistic about TVs is that, in the US,
2.92 million people own TVs and watch an average of five
hours of television per day.
Many people multicast while watching TV.
So this can be shared time.
However, at five hours average per day, television viewing is
likely the top leisure activity in the US.
But what about connected TVs?
By the end of 2015, it's projected that more than 500
million connected TVs will have shipped.
And in 2015, alone, nearly half of the flat panel TVs
sold will have some form of internet connectivity.
And this 500 million cumulative number does not
include TVs that are sold without internet connectivity,
but that are connected to the internet through a set-top
box, game console, media PC, or the like.
The cumulative number of smartphones sold reached
around 500 million at the end of 2011.
But it's definitely worth noting that smartphones have
been on the market for a number of years, whereas the
connected TV market is relatively new.
So why develop apps for TVs?
Well, a lot of people have and watch televisions.
People watch television a lot.
And TVs are getting smarter and better
connected every day.
Also, people love television.
And they want to interact with it and it's content in more
rich and meaningful ways.
We created Google TV with this in mind.
And we made it an open apps platform, so that the
developers can use their intelligence and creativity to
connect with users, when they're in their homes and
looking to relax and be entertained.
Google TV brings two open apps platforms, Android and the
web, to the largest screen and the best sound
system in most homes.
This is Android adapted for the TV space, however.
So the platform includes support for additional AV
codecs and formats, protocols, and APIs that are
relevant for TVs.
Since Google TV is Android, it's open for Android
developers to bring apps to the living room.
In addition, Google TV includes Google Chrome, so
developers that love HTML5 can bring their
apps to TVs as well.
Google TV is an open apps platform, not a device.
However, there are devices available or that are soon to
be released that run Google TV.
On the left is Vizio stream player and the Sony media
player, both of which can be used to add Google TV
experience to HDTVs.
On the right is the LG G2 series TV, which is a TV that
includes the Google TV platform.
The Google TV homescreen, which is the primary user
interface for the platform, has been redesigned to be more
simple and intuitive and to take advantage of several key
Android features.
The face in the background is live TV, which the user can
bring to the foreground quickly.
This area of the homescreen also
supports Android app widgets.
Along the bottom of the home screen is a customizable quick
launch bar.
Here, users have access to status bar notifications sent
from apps, an all apps section, the Google Play
Store, and Global Quick Search.
Google TV has integrated Global Quick Search, which
brings search results from a number of sources to the user.
In this example, you can see search results from the Google
TV programming guide, live TV, and the web.
There are also search results from apps here as well.
Any app that includes a Global Search provider can publish
results to the user initiated Global Searches on Google TV.
Google TV includes the Google Play Store.
If you have an app that is currently published in the
Google Play Store, it may already be available for
Google TV users to install.
For the Google Play Store on Google TV, we feature apps
that look and work great on TVs.
To look great, apps should be designed for the 10 foot or
three meter user experience.
This means that text in UI's controls should be readable
from three meters away and that users interact with
Google TV using handheld remote controls.
Remote controls for the current generation of devices
the support Google TV have a number of similar features,
including full keyboards, directional pads, pointing
devices, such as touchpads or gyroscopic pointers, a search
key to access Global Quick Search, media control keys,
and the Android buttons, Back, Home, and Menu.
The directional pad or d-pad is a very important feature of
the remote controls for Google TV.
Most users prefer to use the d-pad for navigation, so
developers should ensure that their Google TV
apps support it.
Thankfully, the Android platform includes support for
d-pad navigation with standard interactive views.
Developers may need to add d-pad support to customer
views, however.
To do so, they need to ensure that their customer views are
focusable and that they show navigation focus.
Google TV can also be controlled with one or more
virtual input devices.
This is the Google TV remote control app for Android, which
is available in the Google Play store.
A version of this app is also available for iOS devices.
These apps turn user's smartphones and tablets into
Google TV universal remote controls, allowing them to
interact with their TVs in new and unique ways.
For example, these apps allow users to search for content on
Google TV using voice input.
The technology behind these virtual controllers is open
for developers to use, to build their own second screen
apps for Google TV.
Imagine using your smartphone or tablet as a game controller
or giving multiple TV viewers a shared experience on a TV,
but allowing them to interact individually with the TV using
apps on their own handheld devices.
The idea of using multiple screens in the living room is
relatively new.
But it's quickly gaining popularity.
So now it's also a great time to start building apps for the
second screen as well.
Now onto some lower level technical details
about Google TV.
This is a table of the Android screen sizes, densities, and
physical resolutions.
There's a lot of information in this table.
But what's most important are the two cells
highlighted in orange.
These are the Google TV screens, which correspond to
720 and 1080 HDTV resolutions.
Google TV supports two pixel densities, XHDPI and TVDPI,
which is pretty close to HDPI.
I To support both HD resolutions, you generally
only need to include XHDPI resources with your
application.
The platform will scale the resources for TVDPI.
If you do the math, you'll notice that the density
independent pixel resolutions, for both screen sizes, works
out to 960 by 540.
Google TV is a large screen, independent of the resolution.
It's not extra large, like Xoom tablet, because TVs are
viewed from much further away.
It's all a matter of perspective.
Google TV includes a content provider, for retrieving a
list of TV channels that the user has available, and
supports an Intent for changing
channels for the user.
If you want to use this content provider, you must
include the READ CHANNELS permission
in your apps manifest.
This content provider has the names, numbers, and call signs
for the channels, as well as the URI for
channel changing Intent.
Google TV also includes two second screen services that
can be accessed on the user's home network.
The first is for pairing personal devices with Google
TV, so that the devices can securely send
information to the TV.
The second is the Anymote Protocol, which allows devices
to send key events, mouse events, such as movement and
clicking, basic stream data, and URIs for starting Intents.
Whichever app is in the foreground will receive the
key and mouse events.
So you can use the Anymote Protocol to build companion
apps for phones or tablets that interact
with Google TV apps.
These protocols form the foundation of the Google TV
multi screen experience.
Java and C++ libraries that implement these protocols are
available online, open source, so the developers don't need
to start from scratch when building second screen apps
that integrate with Google TV.
The Google TV remote app for Android, that I mentioned
earlier, uses these protocols and is available,
open source, as well.
Due to the 16x9 aspect ratios of HD televisions, a
horizontal, left to right layout works better on Google
TV than the vertical, top to bottom layout, that is
commonly used for phones and tablet apps.
To help developers implement a horizontal layout, we've
released a left navigation bar Android library.
This library includes a class that extends the Android
Action Bar Class, so that you can use it exactly like you
would the Action Bar.
The only difference is that it draws a cell vertically on the
left hand side of the display, instead of at the top.
Google TV includes an Android location provider, but
location works a little bit differently on Google TV than
it does on Android phones and tablets.
To access the location provider on Google TV, you
must include the coarse location permission in your
manifest, which is for non precise coordinates.
And to retrieve a user's location, you need to use the
static location provider.
The location that you get from the Location Manager is only
accurate to the postal code level.
Users are asked to enter their postal codes, when configuring
Google TV for the first time, and they can reenter the
information, at any time, using the system settings.
You should, therefore, only use the postal code portion of
the address associated with the coordinates returned from
the location provider.
To start developing apps for Google TV, you'll need to
install the Android SDK Tools.
And if you'll be using the Eclipse IDE for development,
which is recommended, you'll need the
ADT plug-in for Eclipse.
Once you have the SDK Tools installed, you can run the
Android SDK Manager and install the Android 3.1 SDK
package for developing Google TV apps.
Documentation for installing and using the development
tools can be found on the Android developer website at
developer.android.com/sdk.
For testing your app, the Android SDK Tools includes a
hardware accelerated emulator, that you can use in
conjunction with the Google TV add-on that is part of the
Android 3.1 SDK package.
It can also help to use a real device for testing
apps for Google TV.
An Android tablet, in landscape mode, with a USB or
Bluetooth keyboard attached, will allow you to test your
layouts in d-pad navigation.
However, you should definitely consider getting a Google TV
device for development.
It could definitely make the difference between building a
good app and a great app.
And finally, the Google TVs developer site is the best
place to go to get started with building
apps for Google TV.
Be sure to visit the site at developers.google.com/tv
before you dive into coding.
This site includes documentation, design
guidelines, community resources, and sample code
that should definitely help you build your app.
And that's everything for this tutorial.
If you have any questions, please feel free to reach out
to the Google TV team on Google+.
Our Google+ page is Google TV Developers.
Thanks for watching.