Android 5.0이 출시되면 Google Cast를 지원하는 Android TV가 출시됩니다.
이 문서에서는 Android TV를 설정하고 테스트하기 위해 해야 할 작업을 설명합니다.
몇 가지 방법을 살펴보겠습니다. 기존 Cast 애플리케이션은
추가 작업이 필요 없는 Android TV Cast 애플리케이션을 개발 중인 경우
처음으로 사용하는 경우 Google Cast 문서를 검토합니다.
먼저 Chromecast 기기에서 실행할 Cast 애플리케이션을 개발해야 합니다.
Android TV와 함께
개발 및 테스트할 수 있습니다
개발 설정
Android TV 기기를 설정합니다.
<ph type="x-smartling-placeholder"></ph>
Android TV 기기를 로컬 네트워크에 연결합니다.
Google 계정에 로그인합니다.
설정의 기기 행에서 정보를 선택합니다.
아래로 스크롤하여 대화상자가 표시될 때까지 Build를 여러 번 클릭합니다.
'개발자가 되셨습니다.'라는 메시지와 함께 표시됩니다.
USB 디버깅:
<ph type="x-smartling-placeholder"></ph>
USB 케이블을 설치하되 USB 케이블의 마스터 쪽 끝은 연결하지 않습니다.
컴퓨터에 연결할 수 있습니다.
환경설정 행에서 개발자 옵션을 선택하고
USB 디버깅을 클릭하고 사용을 선택합니다.
홈 화면으로 돌아갑니다. 이 작업을 수행해야만
선택합니다. 초기화를 수행하지 않으면 설정이 유지됩니다.
Cast 애플리케이션을 Android TV와 호환되도록 만드는 데는 아주 적은 노력이 필요합니다.
추가할 수 있습니다 다음은 이 섹션에서 피해야 할 권장사항과 일반적인 함정입니다.
애플리케이션이 Android TV와 호환되는지 확인하려면 다음 단계를 따르세요.
user-agent 문자열에는 'Android'와 'CrKey'가 포함됩니다.
일부 사이트는 모바일 전용 사이트로 리디렉션될 수 있습니다.
'Android' 라벨을 지정합니다. 'Android'라고 가정하지 마세요. 사용자 에이전트 문자열에서 항상
는 모바일 사용자를 나타냅니다.
Android의 미디어 스택은 데이터를 가져오기 위해 투명한 GZIP을 사용할 수 있습니다.
미디어 데이터는 Accept-Encoding: gzip에 응답할 수 있습니다.
Android TV HTML5 미디어 이벤트는
Chromecast에서 숨겨진 문제를 발견할 수도 있습니다.
미디어를 업데이트할 때 <audio>/<video>에 의해 실행된 미디어 관련 이벤트를 사용합니다.
요소(예: timeupdate, pause, waiting)
progress, suspend,
stalled: 플랫폼에 따라 다른 경향이 있기 때문입니다.
Web Receiver 사이트의 HTTPS 인증서를 설정할 때는
중간 CA 인증서가 포함되어야 합니다 자세한 내용은
Qualsys SSL 테스트 페이지를
확인: 사이트의 신뢰할 수 있는 인증 경로에 CA가 포함되어 있는지 확인합니다.
인증서가 '추가 다운로드'로 표시되면 Android 기반
지원합니다
Chromecast가 720p 그래픽 평면에 웹 수신기 페이지를 표시하는 동안
Android TV를 비롯한 다른 Cast 플랫폼에서는 페이지를 최대 1080p까지 표시할 수 있습니다.
Web Receiver 페이지가 다양한 해상도에서 적절하게 조정되는지 확인합니다.
Android 디버그 브리지 사용
Android TV 플랫폼은 다양한 종류의 소비자 가전 제품에 사용됩니다.
모바일 장치에 적합합니다.
각각 다르게 구성할 수 있습니다. 만약
기기의 사용자 인터페이스를 통해 Android TV 시스템 리소스에 액세스하는 경우
Android 디버그 브리지 (ADB)를 사용하여
애플리케이션 디버깅도 지원합니다 Android
디버그 브리지
확인할 수 있습니다
Wi-Fi를 통해 ADB 사용
Wi-Fi 연결로 ADB를 통해 기기에 연결하려면 다음 단계를 따르세요.
Android TV 기기에서 다음에 설명된 대로 개발자 옵션을 사용 설정합니다.
개발 설정
컴퓨터가 Android와 동일한 네트워크에 연결되어 있는지 확인합니다.
TV 기기
터미널을 열고 다음을 입력합니다.
adb connect Android TV device IP address:4321
컴퓨터에서 터미널을 열고 ADB 명령어를 입력합니다. 여기에서
연결이 설정되고 Android TV 기기가 통신하는지 확인합니다.
네트워크에 연결할 수 있습니다
USB 디버깅을 허용하시겠습니까? 대화상자에서 다음에서 항상 허용을 선택합니다.
클릭하고 확인을 선택합니다.
컴퓨터에서 터미널을 열고 ADB 명령어를 입력합니다. 여기에서
연결이 설정되고 Android TV 기기가 통신하는지 확인합니다.
네트워크에 연결할 수 있습니다
adb logcat
TCP/IP를 통해 ADB 사용
ADB는 USB 케이블 없이도 TCP/IP를 통해 작동하지만 먼저
TV 기기의 IP 주소입니다. 개발자 문제 기기가 ADB 포트 연결을 수신 대기함
자동으로 연결되고 포트를 초기화하지 않고도 연결할 수 있습니다. 표준
소매용 Android TV 기기는 ADB 연결을 자동으로 수신 대기하지 않습니다. 대상:
이러한 기기를 사용하려면 먼저 USB 케이블을 사용하여 ADB에 연결하고
포트입니다.
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eExisting Google Cast applications are compatible with Android TV without requiring modifications.\u003c/p\u003e\n"],["\u003cp\u003eBefore developing for Android TV, create a Cast application for Chromecast as a prerequisite.\u003c/p\u003e\n"],["\u003cp\u003eTo debug a Web Receiver on Android TV, connect through ADB and use Chrome DevTools (chrome://inspect).\u003c/p\u003e\n"],["\u003cp\u003eEnsure your Web Receiver handles various resolutions and potential user-agent string issues for compatibility.\u003c/p\u003e\n"],["\u003cp\u003eAndroid TV supports ADB debugging via USB, Wi-Fi, or TCP/IP for easier development and troubleshooting.\u003c/p\u003e\n"]]],[],null,["# Android TV with Google Cast\n\nWith the release of Android 5.0 comes Android TV, which supports Google Cast.\nThis document describes what you need to do to set up and test on Android TV\nwhen developing Cast applications. Your existing Cast application runs on\nAndroid TV with no additional effort. If you are developing a Cast application\nfor the first time, review the [Google Cast documentation](/cast/docs/developers)\nand develop your Cast application to run on a Chromecast device first before\ndeveloping and testing with Android TV.\n| **Note:** This document assumes that you have already developed an application that runs on a Chromecast device, as that is a mandatory first step toward having your Cast application running on Android TV.\n\nSetting up for development\n--------------------------\n\n1. Set up your Android TV device:\n 1. Connect the Android TV device to the local network.\n 2. Sign into your Google account.\n2. From the **Settings** , in the **Device** row, select **About**.\n3. Scroll down to and click on **Build** several times until a dialog appears with the message, \"You are now a developer.\"\n4. If USB debugging:\n 1. Install the USB cable, but don't connect the master end of the USB cable to your computer just yet.\n 2. In the **Preferences** row, select **Developer options** , select **USB debugging** , and select **On**.\n5. Navigate back to the home screen. You must do this to apply the settings you just selected. The settings will persist unless you perform a factory reset.\n6. Register your Android TV device on the [Google Cast SDK Developer Console](https://cast.google.com/publish), as described in [Device Registration](/cast/docs/registration#RegisterDevice).\n\nDebugging\n---------\n\nTo test and debug your Web Receiver application on your Android TV device, do the\nfollowing:\n\n1. Register your Android TV device and your application on the [Google Cast SDK Developer Console](https://cast.google.com/publish). See [Registration](/cast/docs/registration) for more information about registering devices and applications.\n2. Start your sender application and cast to the Android TV device.\n3. Connect to your Android TV device via ADB, as described in [Using Android Debug Bridge](#using_android_debug_bridge).\n4. On your development machine, open a Chrome browser window and navigate to **chrome://inspect** . **Note:** This is different than the [debugging option for a Chromecast device](/cast/docs/debugging#chrome_remote_debugger), where you navigate to your Web Receiver's IP address on port 9222.\n5. Click the **inspect** link to bring the Web Receiver into the debugger.\n6. In the Chrome Remote Debugger console, enable debug logging by entering the\n following:\n\n cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);\n\nSee [Debugging](/cast/docs/debugging) for more information.\n\nGuidelines for Android TV compatibility\n---------------------------------------\n\nMaking your Cast application compatible with Android TV requires very little\nadditional work. Here are some recommendations and common pitfalls to avoid in\norder to ensure your application is compatible with Android TV:\n\n- Be aware that the user-agent string contains both \"Android\" and \"CrKey\"; some sites may redirect to a mobile-only site because they detect the \"Android\" label. Don't assume that \"Android\" in the user-agent string always indicates a mobile user.\n- Android's media stack may use transparent GZIP for fetching data. Make sure your media data can respond to `Accept-Encoding: gzip`.\n- Android TV HTML5 media events may be triggered in different timings than Chromecast, this may reveal issues that were hidden on Chromecast.\n- When updating the media, use media related events fired by `\u003caudio\u003e/\u003cvideo\u003e` elements, like `timeupdate`, `pause` and `waiting`. Avoid using networking related events like `progress`, `suspend` and `stalled`, as these tend to be platform dependent.\n- When configuring your Web Receiver site's HTTPS certificates, be sure to include intermediate CA certificates. See the [Qualsys SSL test page](https://www.ssllabs.com/ssltest/analyze.html) to verify: if the trusted certification path for your site includes a CA certificate labelled \"extra download\", then it may not load on Android-based platforms.\n- While Chromecast displays the Web Receiver page on a 720p graphics plane, other Cast platforms including Android TV may display the page up to 1080p. Ensure your Web Receiver page scales gracefully at different resolutions.\n\nUsing Android Debug Bridge\n--------------------------\n\nThe Android TV platform is featured on many kinds of consumer electronics\ndevices: televisions, set-top boxes, gaming consoles and so forth.\nEach may be configured differently. If you are having difficulty accessing the\nAndroid TV system resources through the device's user interface, you may\nuse the Android Debug Bridge (ADB) to obtain your device's serial number for\nregistration, as well as to debug your application. See [Android\nDebug Bridge](http://developer.android.com/tools/help/adb.html) for more\ninformation.\n\n### Using ADB over Wi-Fi\n\nTo connect to your device via ADB with a Wi-Fi connection:\n\n1. On your Android TV device, enabled developer options as described in [Setting up for development](#setting_up_for_development).\n2. Be sure your computer is connected to the same network as your Android TV device.\n3. Open a terminal and enter the following:\n\n ```\n adb connect Android TV device IP address:4321\n ```\n4. On your computer, open a terminal and enter ADB commands. You can verify the\n connection is established and that the Android TV device is communicating\n across the network with the following command:\n\n ```\n adb logcat\n ```\n\n### Using ADB with a USB cable\n\nTo connect to your device via ADB with a USB cable connection:\n\n1. Set up your Android TV device for development, as described in [Setting up for development](#setting_up_for_development).\n2. Connect the master end of the USB cable to your computer.\n3. In the **Allow USB debugging?** dialog, select **Always** allow from this computer, and select **OK**.\n4. On your computer, open a terminal and enter ADB commands. You can verify the\n connection is established and that the Android TV device is communicating\n across the network with the following command:\n\n ```\n adb logcat\n ```\n\n### Using ADB over TCP/IP\n\nADB works without a USB cable, over TCP/IP, but you must first get the Android\nTV device's IP address. Developer-issue devices listen for ADB port connections\nautomatically and can be connected without initializing the port. Standard\nretail Android TV devices do not listen for ADB connections automatically; for\nthese devices, you must first connect to ADB with a USB cable and initialize\nthe port.\n\n1. Set up your Android TV device for development, as described in [Setting up for development](#setting_up_for_development).\n2. On the Android TV, in the **Device** row, select **Network** \\\u003e **Wi-Fi**, and select the connected network.\n3. Select **Status info** and note the **IP address**.\n4. If your device is a standard, retail Android TV device, do the following:\n\n 1. Follow the steps under [Using ADB with a USB cable](#using_adb_with_a_usb_cable).\n 2. Be sure your computer is connected to the same network as the Android TV device.\n 3. On your computer, in a terminal, initialize the port for TCP/IP by\n entering the following:\n\n ```\n adb tcpip 5555\n ```\n 4. Remove the USB cable, and enter the following in the terminal:\n\n ```\n adb connect Android TV device IP address:5555\n ```\n5. If your device is a developer-issue Android TV, do the following:\n\n 1. Be sure your computer is connected to the same network as your Android TV device.\n 2. Open a terminal and enter the following:\n\n ```\n adb connect Android TV device IP address:4321\n ```\n6. On the Android TV, in the **Allow USB debugging?** dialog, select **Always\n allow from this computer** , and select **OK**. You can verify the connection\n is established and that the Android TV device is communicating across the\n network with the following command:\n\n ```\n adb logcat\n ```"]]