Successfully reported this slideshow.

Intro to Google TV

3,674 views

Published on

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

Published in: Technology
  • Be the first to comment

Intro to Google TV

  1. 1. Intro to Google TV +Matt Gaunt
  2. 2. What?
  3. 3. The Open Smart TV Platform
  4. 4. Android
  5. 5. Big 7
  6. 6. Sony’s Internet streaming set-topbox is available in the US, UK,Germany, Netherlands, France,Brazil, Canada, Mexico andAustralia.
  7. 7. Meet the Devices- ARM Processors- More on the way... Sony Vizio LG
  8. 8. Why?
  9. 9. “ 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 ”
  10. 10. “ In the US, people “watch” an average of ~5 hours of TV per day Three Screen Report, Q1’10: The Nielsen Company ”
  11. 11. 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
  12. 12. Interaction.
  13. 13. Cursor...
  14. 14. Cursor...
  15. 15. Cursor...
  16. 16. D-Pad
  17. 17. D-Pad
  18. 18. Remote ControlMr. Leanback Favorite Beverage
  19. 19. Focus
  20. 20. Beware the Trap!
  21. 21. 123
  22. 22. 1 2 3 Love it Add Friend Send Show on Map
  23. 23. Love itAdd FriendSendShow on Map
  24. 24. Love itAdd FriendSendShow on Map
  25. 25. Love itAdd FriendSendShow on Map
  26. 26. LeftNavBar
  27. 27. 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)
  28. 28. Grab the Library Project Herehttp://code.google.com/p/googletv-android-samples/
  29. 29. So Much Space
  30. 30. 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
  31. 31. Information on screen Big7
  32. 32. Think of Context
  33. 33. SocialShared Experience - Games, learning, exploring, music, shared experiences - Privacy considerations
  34. 34. Second Screen Apps
  35. 35. Remote ControlMr. Leanback Still Drinking His Favorite Beverage
  36. 36. “ 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
  37. 37. 39
  38. 38. RemoteControl Smartphone Tablet? Ms. Multi-screen Laptop Snack 39
  39. 39. Anymote Protocol
  40. 40. Step 1: Discovery Hello? My IP address is xxx.xxx.x.x, I offer service _anymote._tcp on port xxxx mDNS Broadcasts
  41. 41. Step 1: Discovery Oh you have the_anymote._tcp service, you must be a Google TV
  42. 42. 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
  43. 43. Step 2: Pairing I challenge you!! Mwuahaha Challenge Easy. “1234” SecretYou got it, heres the top secret password “Awesome sauce” Secret Ack
  44. 44. Step 3: Anymote The fun part
  45. 45. But this wasn’t friendly :(
  46. 46. 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
  47. 47. 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() { ... } ...}
  48. 48. 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; }};
  49. 49. Bind to AnymoteClientService Java@Overridepublic void onCreate(Bundle savedInstanceState) { ... Intent intent = new Intent(this, AnymoteClientService.class); bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);}
  50. 50. Want a Trackpad? Turn any View into a trackpad Javanew TouchHandler(someView, Mode.POINTER, anymoteSender); Available Modes: - POINTER - SCROLL_HORIZONTALLY - SCROLL_VERTICALLY -ZOOM_VERTICAL
  51. 51. 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 http://code.google.com/p/anymote-protocol/
  52. 52. Send Intents Possibly the most powerful feature is the ability to send intents JavaIntent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(“http://www.google.com”));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...
  53. 53. Control All the Apps...* com.yourapp.ACTION_SHOW_FOO com.randomapp.ACTION_SHOW_BAR* with open intents
  54. 54. Samples + Anymote Library http://code.google.com/p/googletv-android-samples/
  55. 55. 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: http://code.google.com/p/google-tv-remote/ - Pairing Protocol: http://code.google.com/p/google-tv-pairing-protocol/ - Anymote Protocol: http://code.google.com/p/anymote-protocol/ - Protocol Buffers: http://code.google.com/p/protobuf/
  56. 56. Leon Nicholls Anymote for Java https://github.com/entertailion/Anymote-for-Java
  57. 57. Tips & Good to Know
  58. 58. 1080plarge-xhdpi 720p large-tvdpi
  59. 59. 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>
  60. 60. Say no to Toast
  61. 61. https://github.com/keyboardsurfer/Crouton
  62. 62. Please don’t do this
  63. 63. Publishing Time
  64. 64. 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);
  65. 65. 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="com.google.android.tv" android:required= “true” /> - Lastly . . . Tell us about it
  66. 66. More API’s
  67. 67. 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 - http://www.youtube.com/watch?feature=player_embedded&v=bNbKpUqkOso
  68. 68. YouTube Android Player API
  69. 69. http://developers.google.com/tv/ +Google TV Developers
  70. 70. Johan
  71. 71. <Thank You!>http://developers.google.com/tv/mattgaunt@google.com+matt gaunt@gauntface

×