Google TV For Fun

Post on 14-May-2015

677 views 0 download

Tags:

description

Presentation on Google TV app development for DC Droids

Transcript of Google TV For Fun

Copyright © 2012 CommonsWare, LLC

DC Droids

Google TV:For Fun!

(and profit?)

Copyright © 2012 CommonsWare, LLC

Why TV?

● Lots of Tube Time● Sets● Hours in front of a set

● Lots of Smart Tubes● 2010: 20% had integrated Internet functionality

– (no report on number with VCRs blinking “12:00”)

● 2014: estimated 123 million “smart TVs”

Copyright © 2012 CommonsWare, LLC

What is Google TV?

● Android on the Tube● Integrated into some televisions● Integrated into some Blu-Ray players● Dedicated set-top boxes● Future: cable boxes?

● Taking a Tour

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers?

● Usage Model● Phones: used by an individual, mostly● Tablets: might be used by a group, but mostly

one at a time● TVs: used by individuals or collectively as a group● Net: may need “profiles” or other ways for

different settings/content

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers?

● Information Density● Phones = low

– Small screen, but held close● Tablets = medium

– Larger screen, held close● TVs = low

– Large screen, but distant● Net: think font size, contrast, etc. to make it

easy to read and view from the sofa

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers?

● Input● Televisions are not touchscreens... usually● Interact with your app via a controller

– Arrow keys/D-pad and dedicated buttons– Mouse-style pointer emulation mode– Full QWERTY common (with Tab!)– Media keys common (play, pause, etc.)– Option: control via your phone

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers?

● Input Tips● Cut out the cruft = essentials only● Group stuff by priority and provide easy arrow-

key/tab navigation● Use hardware keys where practical

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers?

● An Inch Is No Longer an Inch● 720p is -large, -tvdpi (~213dpi)● 1080p is -xlarge, -xhdpi● Note: regardless of physical screen size!

– Set-top boxes do not know physical size● Net: use fluid layouts, stretchable graphics

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers

● Overscan: Your TV Is Smaller Than You Think

● Holdover from days with CRT-style “tubes”● Visible screen area can be up to ~20% fewer

pixels than actual rating● Net: do NOT try to truly fill the screen!

– Flexible widget sizing– Flexible whitespace between zones– Flexible whitespace on edges

Copyright © 2012 CommonsWare, LLC

What Is Different for Developers

● Miscellany● 1080p backgrounds = ~8MB heap space● Sound over haptics (no vibration motor)● No GPS, use “static” location provider● Internet, but not necessarily WiFi● Content provider and Uri values for channels● No NDK

Copyright © 2012 CommonsWare, LLC

Design Tips

● Think Zones

Copyright © 2012 CommonsWare, LLC

Design Tips

● Think Zones

Copyright © 2012 CommonsWare, LLC

Design Tips

● Think Zones

Copyright © 2012 CommonsWare, LLC

Design Tips

● Think Navigation with Zones

Copyright © 2012 CommonsWare, LLC

Design Tips

● Think Navigation with Zones

Copyright © 2012 CommonsWare, LLC

Deployment Tips

● Avoiding Google TV● <uses-feature android:name=“android.hardware.touchscreen” android:required=“true” />

● Google TV-Specific● <uses-feature android:name=“com.google.android.tv” android:required=“true” />

Copyright © 2012 CommonsWare, LLC

Deployment Tips

● Multiple Targets● <uses-feature android:name=“android.hardware.touchscreen” android:required=“false” />

● getPackageManager() .hasSystemFeature(“com.google.android.tv”)

Copyright © 2012 CommonsWare, LLC

Google TV Rollout

● Rolling Out Your App● Initially: Nothing

– Do not enable Google TV support until you have at least tested it in the emulator

– One chance to make a first impression● Next Tier: Not Completely Stupid

– App is usable if not ideally suited for the form factor● Ultimate: Optimized

Copyright © 2012 CommonsWare, LLC

Google TV Rollout

● Example: Video Player● Nothing: Relies on swiping● Not Completely Stupid

– Focus works, can navigate with D-pad● Optimized

– Eliminate on-screen controls for play, pause, etc.; use remote instead

– Tip: get rid of extraneous focusable widgets

Copyright © 2012 CommonsWare, LLC

Google TV Business Models

● App-Centric● TV app as premium offering● Cable provider partnerships

– Licensing– Sponsorships– Provider-supplied ads/sponsors

● Show-related apps– Video for those not able to get niche channel– Socializing around the show, real-time

Copyright © 2012 CommonsWare, LLC

Google TV Business Models

● Other Services● TV UX Expert

– Lots of phone UX experts, fewer tablet UX experts, negligible experts for TV

● TV Firmware Expert– Many smaller manufacturers may want to use the

Google TV concepts in their set-top boxes and TVs– Learn the ropes via firmware mods and kin

Copyright © 2012 CommonsWare, LLC

Emulator

● Step #1: Get a Nice CPU● Intel with VT extensions (e.g., Core i7)● AMD with SVM extensions

● Step #2: Get Linux● No current support for Windows, OS X

● Step #3: Get KVM● Virtualization engine, akin to VirtualBox, Xen

Copyright © 2012 CommonsWare, LLC

Emulator

● Step #4: Get Android SDK and Tools● Google TV add-on available from SDK Manager● Use R15 Android Developer Tools!

● Step #5: Create an AVD● 720p or 1080p● With or without simulated overscan

Copyright © 2012 CommonsWare, LLC

Debugging on Real Hardware

● Configure Google TV Box● Only accepts debugger connections from 1 IP

● adb connect <ipaddr>● Adds IP-based connection● Google TV box will show up in DDMS● Can use as if locally attached● Helpful if the TV is somewhere nearby...

Copyright © 2012 CommonsWare, LLC

Help!

● https://developers.google.com/tv/● Design guidance● Sample code

● StackOverflow #google-tv● Official support point!