Google TV and Second Screen Apps. What kinds of apps are there and how to make them.
Covers smart tv landscape. By Carmen Delessio. Author of "Sam's Learn Google TV Development in 24 Hours."
Presented at NYC Android Developer meetup. 3/14/2013
at Amplify.com
1. Google TV: How to develop second screen apps
NYC Android Developer Meetup 3.14.2013
Carmen Delessio
Sam’s Learn Google TV Development in 24 Hours
http://about.me/carmendelessio
13. 2008: SmartPhones = dedicated hardware
Android – a software platform, decouples
hardware and software
2012: Over 50% of smart phones use Android
Prediction:
Smart TVs will follow same model. A software
platform will dominate. Google TV is leading
contender.
14. Google Play (a real market) is available on
Google TV
Plenty of Android Developers!
15. The TV is on.
Why are you looking at your
phone?
16. We all look at our phones (or tablets) all the
time.
With a second screen app, the content in
the 2 screens is somehow related
There are at least 4 Kinds of Second
Screen apps
35. Discovery: Hey, there is a TV over here
Pairing: OK, let’s connect
Discovery - recognizing a TV on network
Pairing - establishing trusted communication
38. For all second screen apps, some kind of
discovery and pairing must occur.
Google TV builds in:
Anymote Protocol
&
Google TV Pairing protocol
https://code.google.com/p/anymote-protocol/
https://developers.google.com/tv/remote/docs/pairing
39. Getting Started
The best way to start is to install and run the
BlackJack Demo app
https://code.google.com/p/googletv-android-samples/
git clone https://code.google.com/p/googletv-android-
samples/
41. Install BlackJack Demo
After installation you will have:
BlackJackGTV - a simple 1st screen app
BlackJackTVRemote - a simple 2nd screen app to talk w/ the
first screen app.
Anymote Library – library for Anymote protocol
43. What does Anymote do?
Allows Remote App to send:
Key events
Mouse Events
Connection Events
Intents!
44. BlackJack Remote App Code:
Implement Anymote ClientListener
Get the AnymoteSender when connected
Send Keystrokes to the TV App
“H” for Hit
“S” for Stand
“N” for New Game
47. On the TV App, there is a response to the “H”
Remote app sends KeyEvent.KEYCODE_H via
anymote
TV App gets this key in the onKeyDown() and
responds
48. Sending Intents using Anymote
Just android
- Implicit intents like View a web page
- Explicit – start a specific activity
49. Implicit intents like
View a web page
Demo app takes URL
Displays it on TV
Simple example, shell for other apps
50. Flickr Example
- Gets most recent Flickr Photos
- Select a photo
- Fling it to TV
- Set up Anymote Library
- Get Source code
- You can use this as your Second Screen
Remote app starting point
55. Debugging and Running apps on GTV
Get Computer IP address
Set Debugger address on TV settings
ADB connect to TV:
adb connect 192.168.1.103
TV is just another device
56. Android 4.2.2
Presentation class
Display Content on 2nd Screen