60
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

Second Screen Apps - On Google TV

Embed Size (px)

Citation preview

Google TV: How to develop second screen appsNYC Android Developer Meetup 3.14.2013

Carmen DelessioSam’s Learn Google TV Development in 24 Hourshttp://about.me/carmendelessio

CES 2013 Announcements:ASUSLGHiSenseNetGear

Available Now:Sony, Visio, LG

Develop on a device … for less than $100

YouTube app in the news

YouTube appin the news

Smart TV Projected Growth:

http://techcrunch.com/2012/10/17/smart-tv-growth-for-2012-pegged-at-15-but-north-americans-still-slow-to-adopt/

http://www.displaysearch.com/cps/rde/xchg/displaysearch/hs.xsl/121017_smart_tv_shipments_grow_worldwide_in_2012.asp

Smart TV Technology

http://www.movinapp.com/the-smart-tv-technology/

Google TV is a software platform.

Hardware and software are separate.

Google TV works across manufacturers.

Google TV is a software platform.

Hey, this reminds me of something . . .

Smart Phone Market Share 2008

Apple 19%RIM 44%Palm 13%

Smart Phone Market Share 2012

Google 51%Apple 30%RIM 14%

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.

Google Play (a real market) is available on

Google TV

Plenty of Android Developers!

The TV is on.

Why are you looking at yourphone?

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

Enhanced Viewing apps

Supplement a broadcast TV show

Enhanced Viewing apps

Synced apps

Enhanced Viewing appsDevelopers, check out watchwith.com

Enhanced Viewing apps

Work with all TV Shows

-Or-

Have have some level of content

integration

Remote Control Apps

Remote Control Apps

Content Selection Apps

Select on Device

Play on TV

Content Selection AppsFlickr Example

http://www.informit.com/articles/article.aspx?p=2021960

Content Selection Apps: Opportunities?

What about Facebook?Instagram? Shutterfly?

News or TV Content apps?CNN? Comedy Central?

Content Selection Apps

Select content on device,

Display on TV

Default Display (photos or videos)

Custom display –app on phone and TV

Interactive AppsBlackjack Sample App

Interactive AppsBlackjack Sample App

Make your play using a device

Interactive AppsBlackjack Sample App

ResultsDisplayed onTV

Interactive AppsBlackjack Sample App

Two apps are used

Phone App TV App

Interactive AppsBlackjack Sample App

Multiple devices can beconnected to the TV

Possibilities?

Interactive AppsWedraw.tv and others from movl.com

Interactive AppsInteract with device,

Display on TV

Not just selecting content

There is an app on both the TV and the

device.

Ok already,

Let’s make something

Discovery: Hey, there is a TV over here

Pairing: OK, let’s connect

Discovery - recognizing a TV on network

Pairing - establishing trusted communication

Discovery: Hey, there is a TV over here

Discovery –recognizing a TV on a network

Pairing: OK, let’s connect

Pairing - establishing trusted communication

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

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/

Install BlackJack Demo

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

Install BlackJack Demo BlackJackTVRemote Uses Anymote Library

Android properties for BlackJackTVRemote

What does Anymote do?

Allows Remote App to send: Key events Mouse Events Connection Events Intents!

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

Activity - implement ClientListener

Manifest – defines service & anymote pairing activity

Hit Button Clicked

The sendKeyEvent() method

Remote app sends KeyEvent.KEYCODE_H via anymote

TV App gets this key in the onKeyDown() and responds

On the TV App, there is a response to the “H”

Sending Intents using Anymote

Just android- Implicit intents like View a web page- Explicit – start a specific activity

Implicit intents likeView a web page

Demo app takes URLDisplays it on TVSimple example, shell for other apps

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

http://www.informit.com/articles/article.aspx?p=2021960

RecentPhotoActivity.java

Intent App – remote app uses explicit intent

Remote App code to fling intent:

Debugging and Running apps on GTV

Get Computer IP addressSet Debugger address on TV settings

ADB connect to TV:adb connect 192.168.1.103

TV is just another device

Android 4.2.2 Presentation classDisplay Content on 2nd Screen

OUYA Game Consolehttp://www.ouya.tv/devs/

- Google TV is a software platform

- Different types of second screen apps

- Enhanced Viewing

- Remote control

- Content Selection

- Interactive

- Besides Google TV, Check out

- Watchwith.com

- Movl.com

- http://www.ouya.tv/devs/

Carmen Delessiohttp://about.me/carmendelessio

http://www.bffmedia.comhttp://www.screenitup.com