Transcript
Page 1: Developing Android Applications for Google TV - Android Developer Lab 2011

@googletvdev

Page 2: Developing Android Applications for Google TV - Android Developer Lab 2011

name = {"Paul", "Saxman"}

Page 3: Developing Android Applications for Google TV - Android Developer Lab 2011

dept = "Developer" + " Relations"

Page 4: Developing Android Applications for Google TV - Android Developer Lab 2011

paul.talkAbout(" ")

Page 5: Developing Android Applications for Google TV - Android Developer Lab 2011

specifically...

Page 6: Developing Android Applications for Google TV - Android Developer Lab 2011

I'll provide answers to a few fundamental questions:

Page 7: Developing Android Applications for Google TV - Android Developer Lab 2011

What? Why? How?

Page 8: Developing Android Applications for Google TV - Android Developer Lab 2011

more specifically...

Page 9: Developing Android Applications for Google TV - Android Developer Lab 2011

what is(the soon to be released)

Google TV?

Page 10: Developing Android Applications for Google TV - Android Developer Lab 2011

why should developers be interested in Google TV?

Page 11: Developing Android Applications for Google TV - Android Developer Lab 2011

how does one build apps for Google TV?

Page 12: Developing Android Applications for Google TV - Android Developer Lab 2011

questions?!?

Page 13: Developing Android Applications for Google TV - Android Developer Lab 2011

so then... what exactly is(the soon to be released)

Google TV?

Page 14: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 15: Developing Android Applications for Google TV - Android Developer Lab 2011

for your TV

Page 16: Developing Android Applications for Google TV - Android Developer Lab 2011

meaning...

Page 17: Developing Android Applications for Google TV - Android Developer Lab 2011

everything that you've learned today also applies to

Google TV

Page 18: Developing Android Applications for Google TV - Android Developer Lab 2011

which includes your favorite Honeycomb features, such as...

Page 19: Developing Android Applications for Google TV - Android Developer Lab 2011

fragments

Page 20: Developing Android Applications for Google TV - Android Developer Lab 2011

the Action Bar

Page 21: Developing Android Applications for Google TV - Android Developer Lab 2011

more interactive app widgets

Page 22: Developing Android Applications for Google TV - Android Developer Lab 2011

more content-rich notifications

Page 23: Developing Android Applications for Google TV - Android Developer Lab 2011

Renderscript

Page 24: Developing Android Applications for Google TV - Android Developer Lab 2011

et cetera.

Page 25: Developing Android Applications for Google TV - Android Developer Lab 2011

Google TV works with...

Page 26: Developing Android Applications for Google TV - Android Developer Lab 2011

your TV (device)...

Page 27: Developing Android Applications for Google TV - Android Developer Lab 2011

your cable/satellite (content)...

Page 28: Developing Android Applications for Google TV - Android Developer Lab 2011

your Internet (connection)...

Page 29: Developing Android Applications for Google TV - Android Developer Lab 2011

and the Web.

Page 30: Developing Android Applications for Google TV - Android Developer Lab 2011

there are a number of devices running Google TV

Page 31: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 32: Developing Android Applications for Google TV - Android Developer Lab 2011

and there are definitely more coming!

Page 33: Developing Android Applications for Google TV - Android Developer Lab 2011

Google TV is controlled with devices, such as...

Page 34: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 35: Developing Android Applications for Google TV - Android Developer Lab 2011

which all support...

Page 36: Developing Android Applications for Google TV - Android Developer Lab 2011

keyboardssearchd-pad

pointing devicesmedia keys

back/home/menufavorite

Page 37: Developing Android Applications for Google TV - Android Developer Lab 2011

Google TV can also be controlled by one or more of...

Page 38: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 39: Developing Android Applications for Google TV - Android Developer Lab 2011

it has integrated search....

Page 40: Developing Android Applications for Google TV - Android Developer Lab 2011

and it also includes TV specific features, like...

Page 41: Developing Android Applications for Google TV - Android Developer Lab 2011

picture-in-picture

Page 42: Developing Android Applications for Google TV - Android Developer Lab 2011

a channel changing activity

Page 43: Developing Android Applications for Google TV - Android Developer Lab 2011

a channel listing content provider

Page 44: Developing Android Applications for Google TV - Android Developer Lab 2011

device pairing and communication protocols

Page 45: Developing Android Applications for Google TV - Android Developer Lab 2011

and more...with more to come!

Page 46: Developing Android Applications for Google TV - Android Developer Lab 2011

the Android Market is coming to Google TV...

Page 47: Developing Android Applications for Google TV - Android Developer Lab 2011

and finally, in addition to all the...

Page 48: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 49: Developing Android Applications for Google TV - Android Developer Lab 2011

Google TV has a full version of...

Page 50: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 51: Developing Android Applications for Google TV - Android Developer Lab 2011

meaning that developers who love the Web and...

Page 52: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 53: Developing Android Applications for Google TV - Android Developer Lab 2011

can also develop apps forGoogle TV!

Page 54: Developing Android Applications for Google TV - Android Developer Lab 2011

so... why should developersbuild apps for Google TV?

Page 55: Developing Android Applications for Google TV - Android Developer Lab 2011

to help answer this, here are a few points to get you thinking...

Page 56: Developing Android Applications for Google TV - Android Developer Lab 2011

001/ TVs are, by far, the largest displays in most households

Page 57: Developing Android Applications for Google TV - Android Developer Lab 2011

which means they're great for watching videos, playing games, photo slideshows, etc.

Page 58: Developing Android Applications for Google TV - Android Developer Lab 2011

010/ TVs are connected to the best sound systems in most households

Page 59: Developing Android Applications for Google TV - Android Developer Lab 2011

011/ TVs are near very comfortable furniture in most households

Page 60: Developing Android Applications for Google TV - Android Developer Lab 2011

100/ TVs are great for multi-user viewing and interaction

Page 61: Developing Android Applications for Google TV - Android Developer Lab 2011

101/ TVs are used by over 5 billion people worldwide

Page 62: Developing Android Applications for Google TV - Android Developer Lab 2011

110/ on avg, Americans watch nearly 5 hours of TV daily(which is increasing)

Page 63: Developing Android Applications for Google TV - Android Developer Lab 2011

111/ in 2009, the avg US home had 2.5 people vs. 2.86 TV sets

(source: The Nielsen Company)

Page 64: Developing Android Applications for Google TV - Android Developer Lab 2011

one more point to consider...

Page 65: Developing Android Applications for Google TV - Android Developer Lab 2011

TVs aren't only found in people's living rooms...

Page 66: Developing Android Applications for Google TV - Android Developer Lab 2011

they are also commonly found in:

Page 67: Developing Android Applications for Google TV - Android Developer Lab 2011

bedrooms

Page 68: Developing Android Applications for Google TV - Android Developer Lab 2011

hotel rooms

Page 69: Developing Android Applications for Google TV - Android Developer Lab 2011

classrooms

Page 70: Developing Android Applications for Google TV - Android Developer Lab 2011

airplanes

Page 71: Developing Android Applications for Google TV - Android Developer Lab 2011

hospitals

Page 72: Developing Android Applications for Google TV - Android Developer Lab 2011

lobbies

Page 73: Developing Android Applications for Google TV - Android Developer Lab 2011

bars

Page 74: Developing Android Applications for Google TV - Android Developer Lab 2011

and quite a few other places

Page 75: Developing Android Applications for Google TV - Android Developer Lab 2011

basically, TVs are everywhere...

Page 76: Developing Android Applications for Google TV - Android Developer Lab 2011

a lot of people watch them...

Page 77: Developing Android Applications for Google TV - Android Developer Lab 2011

a lot...

Page 78: Developing Android Applications for Google TV - Android Developer Lab 2011

and they're getting smarterevery day

Page 79: Developing Android Applications for Google TV - Android Developer Lab 2011

and finally... how does one build a Google TV app?

Page 80: Developing Android Applications for Google TV - Android Developer Lab 2011

well, since Google TV is...

Page 81: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 82: Developing Android Applications for Google TV - Android Developer Lab 2011

app developers can use:

Page 83: Developing Android Applications for Google TV - Android Developer Lab 2011

01/ the framework

Page 84: Developing Android Applications for Google TV - Android Developer Lab 2011

10/ the SDK

Page 85: Developing Android Applications for Google TV - Android Developer Lab 2011

11/ the Market

Page 86: Developing Android Applications for Google TV - Android Developer Lab 2011

there's also aGoogle TV add-on, which

includes...

Page 87: Developing Android Applications for Google TV - Android Developer Lab 2011

an image for the KVM accelerated, x86 emulator for

Linux (SDK Tools r12)

Page 88: Developing Android Applications for Google TV - Android Developer Lab 2011

Mac and Windows support is on the way

Page 89: Developing Android Applications for Google TV - Android Developer Lab 2011

for development, there are some important things to keep in mind

about Google TV:

Page 90: Developing Android Applications for Google TV - Android Developer Lab 2011

0001/ the (soon to be released) Google TV is Android 3.1

(API level 12)

Page 91: Developing Android Applications for Google TV - Android Developer Lab 2011

0010/ Google TV supports twoHD resolutions:

1920x1080 and 1280x720

Page 92: Developing Android Applications for Google TV - Android Developer Lab 2011

and two densities:tvdpi (213) and xhdpi (320)

Page 93: Developing Android Applications for Google TV - Android Developer Lab 2011

but it's always just large

Page 94: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 95: Developing Android Applications for Google TV - Android Developer Lab 2011

remember, however, that the closest resources are used

Page 96: Developing Android Applications for Google TV - Android Developer Lab 2011

and don't forget to test both resolutions!

Page 97: Developing Android Applications for Google TV - Android Developer Lab 2011

0011/ due to overscan, you may not get every pixel/DIP

Page 98: Developing Android Applications for Google TV - Android Developer Lab 2011

I know this sounds crazy, but let me explain...

Page 99: Developing Android Applications for Google TV - Android Developer Lab 2011

TVs don't display all the pixels!

Page 100: Developing Android Applications for Google TV - Android Developer Lab 2011

so let your views stretch out,with some scalable

padding between them

Page 101: Developing Android Applications for Google TV - Android Developer Lab 2011

and scale full-screen bitmaps yourself

Page 102: Developing Android Applications for Google TV - Android Developer Lab 2011

0100/ at 10ft, TVs are notouch

Page 103: Developing Android Applications for Google TV - Android Developer Lab 2011

<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

Page 104: Developing Android Applications for Google TV - Android Developer Lab 2011

0101/ d-pad navigation is (generally) better than pointing

Page 105: Developing Android Applications for Google TV - Android Developer Lab 2011
Page 106: Developing Android Applications for Google TV - Android Developer Lab 2011

so focus, focus, focus...

Page 107: Developing Android Applications for Google TV - Android Developer Lab 2011

allow itandroid:focusableandroid:focusableInTouchMode

Page 108: Developing Android Applications for Google TV - Android Developer Lab 2011

show it<selector> <item android:drawable="..." android:state_focused=["true" | "false"] android:state_selected=["true" | "false"] /></selector>

Page 109: Developing Android Applications for Google TV - Android Developer Lab 2011

control itandroid:nextFocusDownandroid:nextFocusLeftandroid:nextFocusRightandroid:nextFocusUpandroid:nextFocusForward [tab]requestFocus [default focus; tag and method]

Page 110: Developing Android Applications for Google TV - Android Developer Lab 2011

and make sure there's always a short path between focus-ables

Page 111: Developing Android Applications for Google TV - Android Developer Lab 2011

0110/ location is coarse and static

Page 112: Developing Android Applications for Google TV - Android Developer Lab 2011

android.permission.ACCESS_COARSE_LOCATION

Page 113: Developing Android Applications for Google TV - Android Developer Lab 2011

LocationManager lm = (LocationManager)this.getSystemService( Context.LOCATION_SERVICE);

Location location = lm.getLastKnownLocation("static");

Page 114: Developing Android Applications for Google TV - Android Developer Lab 2011

1000/ apps can be "made for TV" (but only if necessary)

Page 115: Developing Android Applications for Google TV - Android Developer Lab 2011

<uses-feature android:name="com.google.android.tv" android:required="true" />

Page 116: Developing Android Applications for Google TV - Android Developer Lab 2011

1001/ be sure to require only the features that you need

Page 117: Developing Android Applications for Google TV - Android Developer Lab 2011

com.google.android.tvandroid.hardware.locationandroid.hardware.location.networkandroid.hardware.usb.hostandroid.hardware.wifiandroid.software.live_wallpaper

Page 118: Developing Android Applications for Google TV - Android Developer Lab 2011

if a feature is used for everything but TV (GPS, vibrate, etc.)...

Page 119: Developing Android Applications for Google TV - Android Developer Lab 2011

getPackageManager() .hasSystemFeature("com.google.android.tv");

Page 120: Developing Android Applications for Google TV - Android Developer Lab 2011

1010/ NDK is on the way, but not here yet

Page 121: Developing Android Applications for Google TV - Android Developer Lab 2011

1011/ users' channel listings are available

Page 122: Developing Android Applications for Google TV - Android Developer Lab 2011

com.google.android.tv.permission.READ_CHANNELS

Page 123: Developing Android Applications for Google TV - Android Developer Lab 2011

content://com.google.android.tv.provider/channel_listing

Page 124: Developing Android Applications for Google TV - Android Developer Lab 2011

callsignchannel_namechannel_numberchannel_uri

Page 125: Developing Android Applications for Google TV - Android Developer Lab 2011

1100/ channel changing is possible, too

Page 126: Developing Android Applications for Google TV - Android Developer Lab 2011

so that's about it!

Page 127: Developing Android Applications for Google TV - Android Developer Lab 2011

what to share your ideas for Google TV?

Page 128: Developing Android Applications for Google TV - Android Developer Lab 2011

http://bit.ly/googletvadl

Page 129: Developing Android Applications for Google TV - Android Developer Lab 2011

FIN!

http://code.google.com/tv