본문 바로가기

카테고리 없음

Google TV 개발 방법 정리

늦었지만, 2012-05-14 구글코리아 Google TV 세미나에 다녀온 내용을 정리하여 보자.

세미나 다녀온지 꽤 많은 시간이 지났건만, 이제서야 정리를 하는 … 휴;

 

여하튼, 여기에도 정리하여 볼테지만, 더욱 자세한 내용은, 사실 구글 TV Developer 사이트인, https://developers.google.com/tv/ 에서 더 자세히 알 수 있을 것이다.

 

왜 Google TV를 개발하여야 하는가?

많은 개발자에게 큰 스크린의 TV는 큰 기회가 될것이죠,

2011년 GoogleIO자료 이지만,

 

출처: Google IO 2011

Google TV Demo


CHROME + HONEYCOMB을 합친것으로 보아도 된다.

Android와 같이 바탕화면이 존재하여 Widget을 넣을 수도 있다.

 

Google TV 개발시 고려사항.

  • GPS가 작동하지 않는다.
  • Touch Screen Disabled시켜야 한다. (Manifest)
    • <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
  • Manifest에 구글 TV라고 적어줘야한다.
    • <uses-feature android:name="com.google.android.tv" android:required="true" />
  • 아직 NDK는 지원하지 않아요.(게임개발하시면, SurfaceView등을 대신해서 이용을 하셔야 할듯합니다.
  • 사용자는 다양한 구글 계정을 사용할 수 있다는 점을 항상 유의하세요.
    • 다양한 사람이 사용할 수 있다는 점 . 엄마, 아빠, 동생 누구나 공동으로 사용., Social Device라는 점을 염두에 두고 개발하여야한다. (Keep in mind it is a shared device.)
    • Your app will not show up in Market for Google TV if it uses : NDK, Camera, microphone, Sensors, etc.
    • <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    • <uses-feature android:name="android.hardware.location.gps" android:required="false" />
    • <uses-feature android:name="android.hardware.telephony" android:required="false" />
    • … etc

어떻게 구글 TV를 개발할 것인가?

개발 Philosophy…?

 

10ft Experience à 3m안에서 모두 간단하게 조작할 수 있는 사용자 경험을 맞볼수 있게 대자인 되어야 한다.

또한, RemoteControlApplication(리모콘 어플리케이션)도 개발이 가능하다는 것을 생각해라.

이는, 즉 나중에 가면 SNS같은 툴을 를 이용해서도 TV를 조종할 수 있다는 말.

(안드로이드나, 아이폰으로 구글TV를 조정할 수 있다.)

구글 TV Remote Application Sample : http://code.google.com/p/google-tv-remote/

Apache 2.0 Licence.!

 

해상도 및 방향…?

Orientation

언제나 Landscape모드. Size – Large (cannot re-orient their screen.)

Activities that lock into portrait mode, or set the orientation at runtime, are NOT good candidates for TV.

Ensure your apps function in landscape and look good too!

1280 x 720 – 213 dpi

 

 

 

 

 

구글 TV 개발을 위해 AndroidManifest에 설정하여야 할 내용.

 AndroidManifest elements relevant to Google TV apps

Elements

Google TV specific values

<uses-feature>

Specifies a single hardware or software feature required by your application. To ensure your application appears in the Google Play Store for Google TV, remove any <uses-feature> elements for features that are not supported on Google TV .

By default, Android framework assumes that every Android application uses the touchscreen feature, but Google TV is a non-touchscreen device. This means that you must explicitly specify that your application does not use the touchscreen feature. You do this by adding the following element to the manifest:

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

If you want to limit your application to Google TV, you can add:

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

<compatible-screens>

Avoid using this element for your all your Android applications. While it has no effect on the Android system itself, it does restrict the visibility of your application in services such as the Google Play Store. You should try to make your application available on all forms of device screens, both Google TV and non-Google TV. The topics you are reading now contain guidelines for doing this, and you can also find guidelines in the topic Supporting Multiple Screens in the Android Developers Guide.

Specifically, Google TV apps should support large screen size among other sizes. If you want to set the minimum screen size for your application, use the <supports-screens> element.

<supports-gl-texture>

Check to see that the texture support you specify for mobile devices is also available for Google TV. If it isn't, you may need to make a separate Android package (.apk file) for Google TV.

<supports-screens>

If you set the <uses-sdk> element attributes android:minSdkVersion or android:targetSdkVersion to "3" or less, you may need to use the <supports-screen> element.

By default, Android assumes that an application that requires a minimum SDK version 4 or greater or is designed for an SDK version 4 or greater can support all screen sizes, including those offered by Google TV. Applications based on an older SDK version are assumed to support only the Android pre-defined normal screen size. Since Google TV uses the large screen size, applications based on an older SDK version will appear in a small "postage stamp" window.

Since the postage stamp window may not provide the desired user experience, you can either re-build your application to use a higher SDK version, or you can keep the SDK version but revise your code and resources to support large screens. If you do the latter, you must use the<supports-screens> element to override the Android system assumptions. To do this, add <supports-screens android:largeScreens="true"/> to your manifest file. You must also build against Android 1.6 or later, because <supports-screens>was added in Android 1.6.

<uses-configuration>

This element specifies your application's basic hardware interface requirements. When you migrate an existing Android application to Google TV, you should ensure any <uses-configuration> elements you use are compatible. For example, if you specify <uses-configuration android:reqTouchScreen="finger"/> in your manifest file, Android detects that you want a touchscreen and won't install your application on a Google TV device. If you don't want this to happen, you may want to use the <uses-feature> element instead, since it has more flexibility.

<uses-permission>

<uses-permission android:name="com.google.android.tv.permission.READ_CHANNELS"> requests permission to read the current channel lineup from the Channel Listing Provider. You must specify this element in your (AndroidManifest.xml) if your application reads from the Channel Listing Provider.

<uses-sdk>

This element specifies information about the Android SDKs that work with your application. If you are migrating an existing Android application to Google TV, and you have the <uses-sdk> attributes android:minSdkVersion or android:targetSdkVersion set to "3" or less, you should migrate to a more recent SDK version and change the attributes. This will provide better display support for Google TV devices. Please read the preceding notes for the <supports-screen> element to learn more about this.

<activity android:screenOrientation>

android:screenOrientation="unspecified" specifies that the system chooses the orientation. This is Android's default setting. You can use "unspecificed" or "landscape" values for your Activity's screen orientation. If you use screenOrientation="portrait", Google TV will display an error. In addition, Google TV may rotate the current layout "sideways" so that it becomes unreadable.

 

출처 : https://developers.google.com/tv/android/docs/gtv_androidmanifest

 

구글 TV에뮬레이터 설정.

 

 

구글 TV Remote Application 개발하는 방법.

참고 : http://code.google.com/p/google-tv-remote/

  1. Send keys, mouse events, and URIs to the connected Google TV.

http://code.google.com/p/anymote-protocol

 

 

참고자료 : GOOGLE IO PDF http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/ko//events/io/2011/static/presofiles/developing_android_applications_for_google_tv.pdf

 

구글 TV 디벨로퍼 사이트

https://developers.google.com/tv/