O'Reilly logo

Building Web Apps for Google TV by Steven Hines, Shawn Shen, Amanda Surya, Daniels Lee, Andres Ferrate, Paul Carff, Maile Ohye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Introducing Google TV

Even before Google TV was launched, the same questions seemed to be on everyone’s mind: What exactly is Google TV? Is it a new TV channel? Is it a new LCD TV made by Google? Is it a subscription service? What can you do with it? The answer is actually simple: Google TV is a new platform that seamlessly combines the web with television. As you’ll find in this and subsequent chapters, Google TV is an open and flexible platform that gives you, the developer, various avenues for bringing rich applications to the TV via the web.

Google TV runs on the Android platform, the same platform that powers millions of mobile devices. And Google TV ships with Google Chrome, Google’s own open-source browser which supports both HTML5 and Adobe Flash[1]. This means that there are essentially two paths to build applications for Google TV: you can build web applications (apps) for Chrome or you can develop Android applications. This book is aimed at developers who are interested in creating web apps for Google TV, although many of the design and user experience considerations also are relevant for Android apps.

Tip

The Google Chrome browser is a key differentiator between Google TV and other “smart TVs,” as Google TV is the only platform that includes a full web browser. We feel that Google Chrome gives developers a great advantage, as they can create rich and sophisticated applications using existing technologies and approaches already compatible with Google Chrome and other “modern” web browsers, rather than developing widgets or apps that run on feature-limited browsers.

So is it better to develop web apps or Android apps? This seems to be a question on every developer’s mind as he or she decides to embark on creating an app for Google TV. There is no single answer, but you should consider the following factors (also keep in mind that the Google TV SDK add-on for Android is not yet available):

Type of application you want to build and type of content you want to feature

If your content/app only streams videos or other multimedia content, then going the web/Google Chrome route is often the easiest way to go. On the other hand, if you want to build an app that integrates deeply with the existing system, then building an Android app is the way to go.

An Android app can take advantage of more native feature such as integration with Google TV’s Quick Search Box, where applications can contribute to the global search result displayed to end users.

Developer’s skill set

Building an Android application requires a pretty different skill set from building a web application. Android app development requires knowledge of the Java programming language, while web development typically requires knowledge of JavaScript, HTML, CSS, and/or Flash.

Most apps will require ongoing enhancements and maintenance post-launch, so as a developer, you need to decide which programming language you are most comfortable using.

Timeline for release

Building a web app for Google Chrome can typically be accomplished faster than building an Android app, especially if you already have a website. Some developers have turned around a TV “optimized” site in a matter of two to three weeks. If your site conforms to web standards that Google Chrome supports, it will likely perform well.

Android app development, on the other hand, requires more time to perfect. Android apps may also require some upgrade paths as the platform itself is upgraded with subequent versions of Android.

Monetization strategy

Monetization is a topic that often gets a developer’s attention. The prominent monetization strategy for web apps on Google TV at this point is to show ads on the optimized site. “Pre-rolls” can be shown in videos or banner and Adsense type ads can be displayed on a site.

You could also use a freemium model where you present free content as well as paid content behind a paywall. If the paywall conforms to web standards that Google Chrome supports, normal web-based transactions (e.g., using Google Checkout, PayPal, etc.) should work.

For Android apps, Google TV will integrate Android Market, where developers can offer up their apps for TV for a price. Developers also will eventually have the option to display ads on Android apps installed on Google TV.

Under the Hood: So What’s in There?

Let’s see what exactly powers the Google TV platform. At the time of this writing, the latest version of Google TV commercially available is v1.3, released in March 2011 and, as we already mentioned, there are essentially three key elements of the platform: the Android operating system, Google Chrome, and Flash.

Android

Android is a powerful and versatile platform, and for Google TV, it has been adapted to take full advantage of the TV form factor and the various types of content typically accessed on TV. In adapting Android for Google TV, certain features that are not as relevant to TV are not exposed, including:

  • Touch Screen

  • Accelerometer

  • Gyroscope

  • Bluetooth

  • GPS

Google TV will continue to evolve and it is expected that subsequent versions of the platform will integrate features and functionality that become available on future versions of the Android. You can learn more about Android at

http://developer.android.com.

Google Chrome 5.0

The browser on Google TV is simply the Linux version of Google Chrome. While the user interface is modified slightly for the TV form factor, most of the rendering and web platform capabilities are consistent with desktop versions of Google Chrome, and users receive the latest updates automatically.

Flash 10.1 Beta

A beta version of Flash Player 10.1 for Google TV is built directly into the Google Chrome browser. To ensure that users always have the latest version of Flash Player running on their home devices, the Flash Player will be updated by Google over the air as new versions of the Google TV platform are released.

You can read more details of Flash 10.1 capabilities on Adobe’s website at:

http://goo.gl/YWm1z

User Interface

Note that the Google TV user interface consists of two main components, each offering access to content. The quick search bar (QSB) is universally accessible at any point and it is seamlessly integrated with TV content, allowing users to easily search for content (and apps) while they’re watching TV (Figure 1-1). The home dashboard (Figure 1-2) gives users access to a variety of content, including apps (such as Google Chrome), bookmarks, and syndicated media (such as podcasts and videocasts).

The QSB shows a blend of search results from traditional TV and the web
Figure 1-1. The QSB shows a blend of search results from traditional TV and the web
Users are able to access and bookmark everything from websites to apps on Google TV; note the various “live folders” on the left
Figure 1-2. Users are able to access and bookmark everything from websites to apps on Google TV; note the various “live folders” on the left

A New Target Device

You may or may not remember designing websites for those old CRT monitors (you know, the ones with VGA connections that had a maximum resolution of 640 × 480 pixels). Back then, there were only a few target devices for which you designed and developed websites. Fast-forward to the present day: the web is accessible from an ever increasing number of devices. Desktops, laptops, smart phones, tablets, and even MP3 players have built-in browsers.

It’s no longer a matter of ensuring that your website or web app works well with different browsers; you also have to make sure that it works well on relatively small displays, such as those found on smart phones, and large displays, such as those sexy new LCD monitors that you just got at work. And now TVs are a target device. We know: it’s exciting, yet mildly daunting at the same time.

The TV is the latest target device to come on the web scene. It’s also the best and most easily accessible display in the house.

It’s More Than Just a Big Monitor

One of the first assumptions that some developers make about building web apps for TV is that the target device is just another monitor, albeit a bigger one. While that comparison may be true when it comes to display technology and general form factor, the similarities end when it comes to user interaction and the presentation of content.

The term “10-foot experience” is typically used to allude to the idea that users will be at least 10 feet away when interacting with a TV. When you start to think about how this contrasts with the average use of a monitor display (whether on a laptop or a desktop), it becomes obvious that your web app needs to accomodate the TV, both its physical properties as well as its expected use. Showing curated content from Wikipedia (especially images or snippets of articles) or showing a nice chart for some statistic is viable for a web app geared for TV; however, it’s unlikely that you’ll find too many people interested in reading full-length Wikipedia articles or crunching numbers on a complex spreadsheet on TV.

Input Devices (or How to Control That Google TV)

In addition to its integration with TVs, Google TV relies on input devices to control the user interface, much the same way that a touchpad is used to control a cursor on a laptop or touch gestures are used to control a smart phone.

These input devices range in design and form factor (in some instances they are virtual), but they all share common controls. You can count on users being able to access the following types of controls on a device with Google TV:

  • Full keyboard

  • Mouse or equivalent, including trackpads

  • Media transport controls, including play, pause, stop, next, previous, fast-forward, and rewind

  • Directional pad, otherwise known as a D-Pad or 5-way navigation that includes left, right, top, bottom, and enter buttons

Physical devices currently available include Logitech’s wireless keyboard (Figure 1-3) and Sony’s handheld wireless remote (Figure 1-4).

Tip

You can familiarize yourself with the Google TV user interface by viewing the “What Is Google TV?” video on YouTube (http://goo.gl/SSdQN).

The wireless keyboard that ships with the Logitech Revue
Figure 1-3. The wireless keyboard that ships with the Logitech Revue
Sony’s handheld remote control for its TVs and Blu-ray player that come with Google TV
Figure 1-4. Sony’s handheld remote control for its TVs and Blu-ray player that come with Google TV

Remember When...

The mobile device revolution is still playing out, but we don’t have to look too far back to see how mobile devices have evolved, and, in particular, how Android has evolved. Remember when the T-Mobile G1 first hit the market in October 2008? It was the first smart phone powered by Android to go on sale (Figure 1-5).

The T-Mobile G1, manufactured by HTC, led the way for the more than 60 Android compatible mobile devices available today. Image courtesy HTC, Inc.
Figure 1-5. The T-Mobile G1, manufactured by HTC, led the way for the more than 60 Android compatible mobile devices available today. Image courtesy HTC, Inc.

The phone itself was not necessarily revolutionary, but it did serve to preview a revolutionary mobile platform. And the technology industry took note, as is evident from the reviews that appeared after the G1 was released:

  • PC Mag called it “a basic introduction to what could be a blockbuster mobile platform. While it lacks key features right now, it’s a decent smartphone that will surely grow with time.”[2]

  • CNET wrote “the real beauty of the T-Mobile G1 is the Google Android platform, as it has the potential to make smartphones more personal and powerful. That said, it’s not quite there yet, so for now, the G1 is best suited for early adopters and gadget hounds, rather than consumers and business users.”[3]

  • Engadget summed up its review with “The story here is Android and what it promises ... though doesn’t necessarily deliver on at first. Like any paradigm shift, it’s going to take time. There is tremendous potential for this OS on mobile devices—it truly realizes the open ideals laid out by Google when they announced this project.”[4]

Less than two years later, in June 2010, there were over 60 compatible Android mobile devices (from 21 original equipment manufacturers [OEMs] in 48 countries with 59 carriers) that had embraced the Android platform. Moreover, every day approximately 300,000 Android-powered devices are activated, and the Android market itself has over 100,000 apps. That’s impressive and beyond what many in the Android team expected.

Google TV as a platform is still in its early days. The first version was released in October 2010 and in some ways it is analogous to the G1. Similarly, the potential is there for the Google TV platform to grow and blossom into more devices from more OEMs in more countries, thereby reaching millions of consumers.

An Emerging Opportunity for Developers

From mobile devices that use native apps and mobile browsers to access web apps to Flash applications on a desktop to static websites, developers continue to expand the reach of their creativity and innovation (not to mention entrepreneurship!). The reach of the web continues to expand as more web-capable devices emerge and users continue to gain access to the Internet. Google TV builds on this momentum and brings forth an opportunity for developers to deliver applications that bring further access to the web on the largest screen in the household: the TV.

Just the Facts

You’ve probably heard or read about this statistic somewhere, but people seem to watch a lot of TV, especially North Americans. A recent Nielsen study found that people on average watched nearly five hours of TV per day in the U.S. during the first half of 2010 (this includes adults and children).[5] As for the Internet, adults in the U.S. spent an average of 13 hours per week online in 2010.[6] In fact, according to Forrester Research, in 2010, adults in the U.S. for the first time spent as much time online as they did watching TV.[6] Take into account that there are approximately 115 million households in the U.S. with at least one TV (Figure 1-6)[7], many of whom already have or soon will have broadband access (Figure 1-7). The potential reach for web apps geared for TV is quite large, and we’ve only touched on statistics for the U.S.[8] On a worldwide basis, about three-quarters of every household has a TV and approximately one billion people have access to the Internet.[9]

The number of households with a TV in the U.S. continues to grow, with a projected one million additional households in 2010–2011. Source: The Nielsen Company. Number of U.S. TV Households Climbs by One Million for 2010-11 TV Season. August 27, 2010.
Figure 1-6. The number of households with a TV in the U.S. continues to grow, with a projected one million additional households in 2010–2011. Source: The Nielsen Company. Number of U.S. TV Households Climbs by One Million for 2010-11 TV Season. August 27, 2010. http://goo.gl/ITaTK
Households across the U.S. are increasingly gaining access to broadband Internet. Almost 80% of households in the U.S. have an Internet connection, and in 2010, approximately 90% of those households had a broadband Internet connection. Source: Understanding The Changing Needs Of The US Online Consumer, 2010. Jacqueline Anderson et al. Forrester Research, Inc. December 13, 2010.
Figure 1-7. Households across the U.S. are increasingly gaining access to broadband Internet. Almost 80% of households in the U.S. have an Internet connection, and in 2010, approximately 90% of those households had a broadband Internet connection. Source: Understanding The Changing Needs Of The US Online Consumer, 2010. Jacqueline Anderson et al. Forrester Research, Inc. December 13, 2010.

Consider for a moment that we’re at the early stages of a convergence between TV and the web. The web encompasses a broad set of content, much of which is relevant for consumption on TV. Now imagine for a moment that a platform like Google TV gives users access to both traditional TV programming and content on the web in a seamless way.

Users aren’t likely to care so much about the source of the content, but rather the content itself. And it’s this seamless integration that gives developers a new avenue for web apps that provide access to content and features alongside traditional TV.

We’ve established that there’s a large audience of people that have both a TV and broadband Internet access. So what kinds of content should your web app deliver?

Video is an obvious fit for TV, and online video is certainly a popular media type on the web. Consider that in October 2010 over 84% of the U.S. Internet audience (175 million people or so) viewed online video (with an average video length of five minutes).[10] If you’ve got video content or you can integrate video content, this is certainly one media type not to exclude from your web app.

You may also want to consider audio content. TVs typically tend to be hooked up to home entertainment systems and thus audio content delivered to a TV can be enjoyed on a system that plays audio well. Images, especially photos, also lend themselves well to TV. The web is full of user-contributed images on sites like Flickr and Picasa, as well as professional and computer-generated images, all of which tend to display well on TV.

Games also present another opportunity for web apps on Google TV. Games are a popular online activity in the U.S., second only to social networks.[11] There already is a booming industry for console games for TV, and in general these are not the type of games that you would replicate with a web app (nor would it be fair to compare Google TV to a game console). However, casual and social games do lend themselves well to web apps and Google TV.

Other content may also be appropriate, relevant, and compelling to a TV audience. Since the relatively recent release of Google TV, there have already been several web apps produced that deliver some interesting content on TV, including children’s books, newspapers, and sports statistics. The key to determining what content will work well on Google TV is to place yourself in your living room and to think about what parts of the web you’d like to see most on your TV.

Tip

Be sure to research specific audience demographics to determine whether the app you’re building is a good fit for a traditional TV audience.

Working with the Open Web

At the Google I/O conference in May 2010, Google announced that user adoption for its Chrome browser had been steadily growing over the last year, reaching over 70 million active users. Fast-forward to December 2010, when Google’s Chrome team announced that the browser now has over 120 million active users (pretty good numbers for a browser that was released to the public two years prior). It seems that an increasing number of users are finding Google Chrome to be useful, and the inclusion of this “modern” browser on the Google TV platform is good news for developers as well.

Remember that the Chrome browser on Google TV includes support for rich web apps through both HTML5 and Flash. This means that just about any website on the web can be displayed on Google TV, making the web accessible the way that it was originally intended to be: as an open network. There are no restrictions on what can be accessed via the Chrome browser on Google TV, and this bodes well for you, the developer, as it means that there is no approval process or new set of technologies that stand in your way of getting something valuable and compelling out into the open web.

A Web App Is Worth a Thousand...

Thus far, we’ve touched on some conceptual discussion about the opportunity that Google TV presents for developers. A potentially large audience, the open web, a modern browser: these are all parts of the opportunity to bring web apps to the living room.

There is also an opportunity to innovate with regard to these web apps, as is evident by the increasing number of web apps that have been created or customized for Google TV. This is a new category of web apps that are catered for use on a TV. Here’s a brief overview to give you a feel for what types of web apps developers have produced for Google TV.

YouTube Leanback

The YouTube web app for Google TV is aptly named YouTube Leanback. The app is Flash-based and it is one of the first web apps that was specifically developed for Google TV. As you can see, the contrast between the standard YouTube UI (Figure 1-8) and YouTube Leanback (Figure 1-9) is quite significant.

The standard YouTube UI
Figure 1-8. The standard YouTube UI
YouTube’s Leanback UI
Figure 1-9. YouTube’s Leanback UI

Since its release, the YouTube Leanback UI has served as a model for other web apps that are focused on video. Emphasis is on graphical elements and the videos automatically launch in full-screen. You can check out this web app on your Google TV or web browser at http://www.youtube.com/leanback.

Meegenius

Meegenius is an online children’s book service that includes several enhancements, including word highlighting and audio playback. Traditional stories such as The Three Little Pigs and The Boy Who Cried Wolf are displayed as text, while the words of the book are highlighted as the stories are read aloud by a human voice. Meegenius has developed a web app for Google TV that is based on an existing suite of apps, and the experience they deliver highlights the accessibility and relevance of niche content on TV.

Figure 1-10 shows the Meegenius “bookshelf,” an index of stories that can be selected and viewed on Google TV. When a user selects a story (Figure 1-11), the UI moves into a virtual book mode wherein stories are read out loud while words are highlighted. The use case here is compelling, and it combines virtual learning with TV.

The Meegenius bookshelf places emphasis on titles and thumbnails, and it is D-Pad navigable
Figure 1-10. The Meegenius bookshelf places emphasis on titles and thumbnails, and it is D-Pad navigable
Taking a look at The Boy Who Cried Wolf on the Meegenius web app
Figure 1-11. Taking a look at The Boy Who Cried Wolf on the Meegenius web app

Flixster

Flixster is a social recommendation engine for movies that also provides movie reviews from Rotten Tomatoes. This web app uses HTML5 for the UI (Figure 1-12) and Flash to stream movie trailers in full screen.

Flixster’s elegant UI makes it easy to drill down and access content for a variety of movies
Figure 1-12. Flixster’s elegant UI makes it easy to drill down and access content for a variety of movies

When taking a look at this web app on Google TV, the lines between a native app and web app blur quite a bit, and unless you were to take a look at the browser’s address bar, you would have a hard time telling that this is a web app.

The Next Killer App

You’ve likely heard of the smart phone and tablet apps that rose to popularity with the introduction of the Android market as well as Apple’s App Store—apps like Pandora, Angry Birds, and Talking Tom Cat. These apps have flourished because users have adopted new devices and these users have gravitated to apps that provide unique and compelling experiences.

Likewise, as the web finds its way to an increasing number of TVs, users will be in search of the next set of killer apps for the large TV screen. What will those be? What can they do? How much can you charge for it? We don’t know the answers yet, but as with any new platform, developers like yourself will help to shape the future of apps on television.



[1] The Google TV platform supports videos rendered in Adobe Flash format. Visit Adobe’s developer website at http://www.adobe.com/devnet/devices/ for further information on developing content using Adobe Flash technology.

[2] T-Mobile G1 (Google Android Phone). PC Mag, 2008. http://goo.gl/GQzIi

[3] T-Mobile G1 (black). CNET, 2008. http://goo.gl/7Diuz

[4] T-Mobile G1 review, part 2: software and wrap-up. Engadget, 2008. http://goo.gl/ly7mN

[5] The Nielsen Company. State of the Media, TV Usage Trends: Q2 2010. 2010. http://goo.gl/TnhZ6

[6] Understanding The Changing Needs Of The US Online Consumer, 2010. Jacqueline Anderson et al. Forrester Research, Inc. December 13, 2010.

[7] The Nielsen Company. 2010 Media Industry Fact Sheet. 2010. http://goo.gl/wPTj

[8] Keep in mind that Google TV is currently only available in the U.S.

[9] THE WORLD IN 2009: ICT Facts and Figures. International Telecommunication Union, 2009.

[10] comScore Releases October 2010 U.S. Online Video Rankings. comScore, 2010. http://goo.gl/ASqYR

[11] The Nielsen Company. What Americans Do Online: Social Media And Games Dominate Activity. August 2, 2010. http://goo.gl/6ynoZ

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required