You are previewing Sams Teach Yourself Google TV™ App Development in 24 Hours.
O'Reilly logo
Sams Teach Yourself Google TV™ App Development in 24 Hours

Book Description

In just 24 sessions of one hour or less, Sams Teach Yourself Google TV App Development in 24 Hours will help you master app development with the radically improved new version of Google TV running Android 3.2 and Android second-screen apps using 4.2. Using its straightforward, step-by-step approach, you’ll gain the hands-on skills you need to build all three types of Google TV apps: Web, Android, and second-screen apps. You’ll learn today’s Google TV development best practices. Every lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!

Step-by-step instructions carefully walk you through the most common Google TV development tasks

Quizzes and Exercises at the end of each chapter help you test your knowledge

Notes present interesting information related to the discussion

Tips offer advice or show you easier ways to perform tasks

Cautions alert you to possible problems and give you advice on how to avoid them

Carmen Delessio is an expert Android and application developer who has worked as a programmer, technical architect, and CTO at large and small organizations. He began his online development career at Prodigy working on early Internet applications. He has written for Androidguys.com, Mashable, and ScreenItUp.com. His apps can be found at Bffmedia.com.

Learn how to…

n Develop for TV watchers and the “10-foot user experience”

n Create highly interactive and responsive TV apps

n Use Google TV’s optimized HTML templates and layouts

n Integrate HTML5 and jQuery into your Google TV apps

n Design effective user interaction, dialogs, navigation, and video sitemaps

n Organize Google TV apps intuitively with Tabs and the ActionBar

n Use Fragments to simplify your development process

n Store structured data locally in SQLite for instant user access

n Create and use ContentProviders

n Use the Channel Listing Provider for apps with TV listings and changing channels

n Build second-screen apps to connect Google TV with a second device

n Use the Anymote protocol to handle messaging between TVs and remote devices

n Bring it all together to build a complete Google TV app, from start to finish

Table of Contents

  1. Title Page
  2. Copyright Page
  3. Praise for Sams Teach Yourself Google TV™ App Development in 24 Hours
  4. Contents at a Glance
  5. Table of Contents
  6. Preface
    1. Why Google TV Is Important
    2. Who This Book Is For
    3. How This Book Is Organized
  7. About the Author
  8. Dedication
  9. Acknowledgments
  10. We Want to Hear from You
  11. Reader Services
  12. Hour 1. Developing for Google TV and the 10-Foot User Experience
    1. Google TV UI
    2. TV as a Device
    3. Google TV Apps
    4. 10-Foot User Experience
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  13. Hour 2. Optimizing Web Pages for Google TV
    1. Displaying Content on TV Screens
    2. Playing Video
    3. Displaying Text and Color
    4. Navigating the Big Screen
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  14. Hour 3. Using Google’s Video Templates
    1. Google Video Templates
    2. Examining the Template Structure
    3. Understanding the JavaScript for Template 2
    4. Using Templates to Show Your Own Videos
    5. Retrieving Videos Using AJAX
    6. Summary
    7. Q&A
    8. Workshop
    9. Exercises
  15. Hour 4. HTML5 and jQuery UI Library for Google TV
    1. Video Properties and Controls
    2. Adding Video Controls
    3. Adding Some Style
    4. Using the jQuery GTV UI Library
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  16. Hour 5. Using the Google TV Closure UI Library
    1. Using Closure for Google TV Web Apps
    2. Using the Library to Create an HTML Page
    3. Buttons, Lightboxes, and Other Components
    4. Summary
    5. Q&A
    6. Workshop
    7. Exercises
  17. Hour 6. Creating a Video Sitemap
    1. Searching on Google TV
    2. Sitemaps and Google Webmaster Tools
    3. Adding Details to Video Sitemaps
    4. Tags That Provide Additional Info on Google TV
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  18. Hour 7. Android and Google TV
    1. Android, the Google TV Operating System
    2. Understanding the Development Environment
    3. Testing Your Apps
    4. Setting Up an Android Project in Eclipse
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  19. Hour 8. Using Android Layouts for Your Google TV App
    1. Layout Basics with LinearLayout
    2. Laying Out Widgets
    3. FrameLayout
    4. RelativeLayout
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  20. Hour 9. Optimizing UI Components for Google TV
    1. Form Widgets
    2. Using ImageViews
    3. Using VideoViews
    4. Putting Button Overlays on a Video
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  21. Hour 10. Organizing Google TV Apps Using the ActionBar
    1. Implementing an ActionBar
    2. Adding Tabs
    3. Adding ActionItems and MenuItems
    4. Using the LeftNavBar Library
    5. Putting It All Together
    6. Summary
    7. Q&A
    8. Workshop
    9. Exercises
  22. Hour 11. Understanding Activities and Fragments in a Complex App
    1. Understanding the Activity Life Cycle
    2. Understanding Fragments
    3. Swapping Fragments in an Activity
    4. Using Fragments with ActionBar
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  23. Hour 12. Using Specialized Fragments
    1. DialogFragments
    2. ListFragments
    3. Grids and Galleries
    4. Summary
    5. Q&A
    6. Workshop
    7. Exercises
  24. Hour 13. Handling D-Pad and Key Events
    1. Designing for the D-Pad
    2. Controlling Focus
    3. Programming D-Pad Key Events
    4. Summary
    5. Q&A
    6. Workshop
    7. Exercises
  25. Hour 14. Accessing Remote Content for a Google TV App
    1. Displaying Remote Images and Videos
    2. Fetching Remote Data
    3. Using and Parsing JSON Formatted Data
    4. Putting the Pieces Together in the App
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  26. Hour 15. Storing Data with SQLite
    1. Organizing a Database with Tables
    2. Managing Data with SQLiteOpenHelper
    3. Adding, Deleting, and Updating Data
    4. Querying Data and Using Cursors
    5. Using a Database in the App
    6. Summary
    7. Q&A
    8. Workshop
    9. Exercises
  27. Hour 16. Creating a Content Provider
    1. Using a URI for Data Retrieval
    2. Building a ContentProvider
    3. Using PhotoProvider in Our App
    4. Requesting a File from a ContentProvider
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  28. Hour 17. Using Loaders and CursorLoaders
    1. How Loaders Work
    2. Loader Classes
    3. Loader States and LoaderManager.Callbacks
    4. Adding Loaders to ImageViewFragment
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  29. Hour 18. Developing a Complete App
    1. Determining What the App Will Do
    2. Developing the GridFragment
    3. Enhancing the Activity Class
    4. Adding the ActionBar
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  30. Hour 19. Mastering the Android Manifest File
    1. Android Manifest Basics
    2. Understanding Intents
    3. Adding Google TV Specifics to the Manifest File
    4. Publishing Your App
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  31. Hour 20. Using the Channel Listing Provider
    1. Getting Data from the Channel Listing Provider
    2. Listing All Channels
    3. Changing the Channel
    4. Understanding Audio Focus
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  32. Hour 21. Using Second Screen Apps with Google TV
    1. How Second Screen Apps Are Used
    2. Types of Second Screen Apps
    3. User Interaction with Second Screen Apps
    4. Connecting a TV with a Second Screen
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  33. Hour 22. Examining an Example Second Screen App
    1. Preparing the Blackjack Second Screen App
    2. Running the Blackjack App
    3. Exploring the Blackjack App Code
    4. Exploring the Anymote Library Code
    5. Summary
    6. Q&A
    7. Workshop
    8. Exercises
  34. Hour 23. Developing Second Screen Apps
    1. Flinging a URL
    2. Sending KeyEvents to the TV
    3. Sending Mouse Events to the TV
    4. Summary
    5. Q&A
    6. Workshop
    7. Exercises
  35. Hour 24. Working with Anymote and Pairing Protocols
    1. The Anymote Protocol
    2. Pairing Protocol
    3. Using Anymote and Pairing in a Chrome Extension
    4. Summary
    5. Q&A
    6. Workshop
    7. Exercises
  36. Index
  37. Ad Pages