Intro to Google TV
Upcoming SlideShare
Loading in...5

Intro to Google TV



An introduction to Google TV development, how you can bring your app's to the platform.

An introduction to Google TV development, how you can bring your app's to the platform.



Total Views
Views on SlideShare
Embed Views



8 Embeds 2,023 870 777
http://localhost 282 84 5 3 1 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Intro to Google TV Intro to Google TV Presentation Transcript

  • Intro to Google TV +Matt Gaunt
  • What?
  • The Open Smart TV Platform
  • Android
  • Big 7
  • Sony’s Internet streaming set-topbox is available in the US, UK,Germany, Netherlands, France,Brazil, Canada, Mexico andAustralia.
  • Meet the Devices- ARM Processors- More on the way... Sony Vizio LG
  • Why?
  • “ In the US, homes have an average of 2.5 people and 2.93 TV sets (and rising!) Television Audience Report, 2009: The Nielsen Company ”
  • “ In the US, people “watch” an average of ~5 hours of TV per day Three Screen Report, Q1’10: The Nielsen Company ”
  • Continued Growth- 22% of US broadband household already own an HDTV with integrated TV apps Source: In-Stat “Q2’11 US Digital Entertainment Database,” July 26, 2011- 60% of connected-TV households will use a TV app at least once per week Source: In-Stat “Q2’11 US Digital Entertainment Database,” July 26, 2011- By 2015, 500 million web enabled TV’s Source: Crave Asia, July 8, 2011
  • Interaction.
  • Cursor...
  • Cursor...
  • Cursor...
  • D-Pad
  • D-Pad
  • Remote ControlMr. Leanback Favorite Beverage
  • Focus
  • Beware the Trap!
  • 123
  • 1 2 3 Love it Add Friend Send Show on Map
  • Love itAdd FriendSendShow on Map
  • Love itAdd FriendSendShow on Map
  • Love itAdd FriendSendShow on Map
  • LeftNavBar
  • To Use It? - Use the LeftNavBar like so... XMLprivate LeftNavBar mLeftNavBar;...private LeftNavBar getLeftNavBar() { if (mLeftNavBar == null) {    mLeftNavBar = new LeftNavBar(this);    }    return mLeftNavBar;} - Then treat it like an ActionBar (it’s the same API)
  • Grab the Library Project Here
  • So Much Space
  • Big, but small• Traditionally designed consumption not interaction• Far away = lower information density• Ironically, not so good for reading a lot of text• Big Sound: Great for video, and listening to music• Different than phones: personal, location, size, touch• Not just a big Tablet => more like a PHONE Big, but small Traditionally designed consumption not Far away = lower information density Ironically, not so good for reading a lot of Big Sound: Great for video, and listening Different than phones: personal, locatiot 29
  • Information on screen Big7
  • Think of Context
  • SocialShared Experience - Games, learning, exploring, music, shared experiences - Privacy considerations
  • Second Screen Apps
  • Remote ControlMr. Leanback Still Drinking His Favorite Beverage
  • “ In the U.S., 88 percent of tablet owners and 86 percent of smartphone owners said they used their device while watching TV... Q4 2011 Survey of Connected Devices Owners ” Nielsen Company
  • 39
  • RemoteControl Smartphone Tablet? Ms. Multi-screen Laptop Snack 39
  • Anymote Protocol
  • Step 1: Discovery Hello? My IP address is, I offer service _anymote._tcp on port xxxx mDNS Broadcasts
  • Step 1: Discovery Oh you have the_anymote._tcp service, you must be a Google TV
  • Step 2: Pairing Hey, can I connect to you? Pairing Request Yeah sure :) Pairing AckCool, well I can deal with hexadecimal passwords & ... Challenges it can deal with Well I can give you these challenges and you need to give me back this ... Challenges it can give & expected response
  • Step 2: Pairing I challenge you!! Mwuahaha Challenge Easy. “1234” SecretYou got it, heres the top secret password “Awesome sauce” Secret Ack
  • Step 3: Anymote The fun part
  • But this wasn’t friendly :(
  • Anymote LibraryMakes Anymote easy to useAn Android Library project which simplifies finding, pairing and sending events toGoogle TV using the Anymote Protocol 1.Implement the AnymoteClientService.ClientListener interface (3 methods) 2.Implement a ServiceConnection to attach your ClientListener to the AnymoteClientService 3.Bind to the AnymoteClientService to initiate the pairing process 4.Use the AnymoteSender to send messages to Google TV using the Anymote protocol
  • Impl. ClientListener Interface Javapublic class YourActivity extends Activity implements AnymoteClientService.ClientListener { private AnymoteSender anymoteSender; @Override public void onConnected(AnymoteSender anymoteSender) { this.anymoteSender = anymoteSender; // Save for sending messages } @Override public void onDisconnected() { ... } @Override public void onConnectionError() { ... } ...}
  • Impl. a ServiceConnection Javaprivate AnymoteClientService anymoteService;private ServiceConnection serviceConnection = new ServiceConnection() { public void onServiceConnected(ComponentName name, IBinder service) { anymoteService = ((AnymoteClientService.AnymoteClientServiceBinder) service).getService(); anymoteService.attachClientListener(YourActivity.this); // YourActivity is a ClientListener // TODO: Check if the service already has a AnymoteSender } public void onServiceDisconnected(ComponentName name) { anymoteService.detachClientListener(YourActivity.this); // Stop receiving notifications anymoteService = null; }};
  • Bind to AnymoteClientService Java@Overridepublic void onCreate(Bundle savedInstanceState) { ... Intent intent = new Intent(this, AnymoteClientService.class); bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);}
  • Want a Trackpad? Turn any View into a trackpad Javanew TouchHandler(someView, Mode.POINTER, anymoteSender); Available Modes: - POINTER - SCROLL_HORIZONTALLY - SCROLL_VERTICALLY -ZOOM_VERTICAL
  • Send Key Events You can send key events to take control of Google TV JavasomeButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { anymoteSender.sendKeyPress(KeyEvent.KEYCODE_DPAD_CENTER); }}); For a full list of available key codes download the anymote-protocol and then look at ./ proto/keycodes.proto
  • Send Intents Possibly the most powerful feature is the ability to send intents JavaIntent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(“”));anymoteSender.sendIntent(intent); JavaIntent intent = new Intent(“com.example.yourapp.VIEW_ACTION”);anymoteSender.sendIntent(intent); Default use case is to open a companion application on the TV, but you can do more...
  • Control All the Apps...* com.yourapp.ACTION_SHOW_FOO com.randomapp.ACTION_SHOW_BAR* with open intents
  • Samples + Anymote Library
  • Noteworthy Bits- Limitations - One way communication - May not be the fastest (i.e. may not be suitable for games)- Discovery handled by the app: Google TV Remote[1] (can use JmDNS)- Pairing & Auth: Pairing Protocol Reference Implementation[2]- Sending Events: Anymote Protocol Reference Implementation[3]- Pairing and Anymote Protocols user Protocol Buffers[4] (lite) - Google TV Remote for Android: - Pairing Protocol: - Anymote Protocol: - Protocol Buffers:
  • Leon Nicholls Anymote for Java
  • Tips & Good to Know
  • 1080plarge-xhdpi 720p large-tvdpi
  • Am I on TV yet? - Don’t forget the -television specifier XML: values/bools.xml<?xml version="1.0" encoding="utf-8"?><resources> <bool name="is_television">false</bool></resources> XML: values-television/bools.xml<?xml version="1.0" encoding="utf-8"?><resources> <bool name="is_television">true</bool></resources>
  • Say no to Toast
  • Please don’t do this
  • Publishing Time
  • Publishing No-No’s - Never do this XML<activity android:screenOrientation="portrait"> - This will get filtered out XML<uses-feature android:name="android.hardware.screen.portrait" android:required=”true” /> - Use this and pain will follow XMLsetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_POTRAIT);
  • Publishing Checklist - Tell Play that you don’t need touch events XML<uses-feature  android:name="android.hardware.touchscreen" android:required= “false” /> - Do you need to target Google TV only? XML<uses-feature  android:name="" android:required= “true” /> - Lastly . . . Tell us about it
  • More API’s
  • Future GTV API’s- Smooth Streaming support- PlayReady support- Custom Streaming & Custom DRM support- Quality of Service (QoS) API’s- Google I/O 2012 - Get Your Content Onto Google TV -
  • YouTube Android Player API
  • +Google TV Developers
  • Johan
  • <Thank You!> gaunt@gauntface