Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Android 5.0 sürümü, Google Cast'i destekleyen Android TV'yle birlikte geliyor.
Bu dokümanda, Android TV'yi kurmak ve test etmek için yapmanız gerekenler açıklanmaktadır
bazı ipuçları vereceğim. Mevcut Cast uygulamanız şu cihazda çalışır:
Ek çaba sarf etmeden Android TV. Google Cast uygulaması geliştiriyorsanız
İlk kez Google Cast dokümanlarını inceleyin
ve Cast uygulamanızı önce bir Chromecast cihazda çalışacak şekilde geliştirin
test etmek için Android TV ile geliştirme ve test gerçekleştirme olanağı sunar.
Geliştirme için hazırlama
Android TV cihazınızı ayarlama:
Android TV cihazını yerel ağa bağlayın.
Google hesabınızda oturum açın.
Ayarlar'daki Cihaz satırında Hakkında'yı seçin.
Ekranı aşağı kaydırın ve iletişim kutusu görünene kadar Build'i birkaç kez tıklayın.
"Artık bir geliştiricisiniz" mesajıyla görünür.
USB üzerinden hata ayıklama yapılıyorsa:
USB kablosunu takın ancak USB kablosunun ana ucunu bağlamayın
henüz bilgisayarınıza bağlamadınız.
Tercihler satırında Geliştirici seçenekleri'ni belirleyip
USB üzerinden hata ayıklama'yı tıklayın, ardından Açık'ı seçin.
Ana ekrana geri dönün. Oluşturduğunuz ayarları uygulamak için
az önce seçildi. Fabrika ayarlarına sıfırlamadığınız sürece ayarlar değişmeden kalır.
Android TV cihazınızda Web Alıcısı uygulamanızı test etmek ve hata ayıklamak için
takip etmek için:
Android TV cihazınızı ve uygulamanızı
Google Cast SDK Geliştirici Konsolu.
Daha fazla bilgi için Kayıt başlıklı makaleyi inceleyin.
cihazları ve uygulamaları kaydettirmek.
Gönderen uygulamanızı başlatın ve Android TV cihazında yayınlayın.
Cast uygulamanızı Android TV ile uyumlu hale getirmek için çok az şey gerekir
gerek yok. Aşağıda,
uygulamanızın Android TV ile uyumlu olduğundan emin olmak için:
Kullanıcı aracısı dizesinin hem "Android" hem de ve "CrKey";
Bazı siteler, ilk olarak mobil cihazlara özel bir siteye
"Android" etiket. Önce "Android" olduğunu varsaymayın emin olmak için
mobil kullanıcıyı ifade eder.
Android'in medya yığını, veri getirmek için şeffaf GZIP kullanabilir. Şunlardan emin olun:
medya verileriniz, Accept-Encoding: gzip komutuna yanıt verebilir.
Android TV HTML5 medya etkinlikleri,
Bu işlem Chromecast'te gizlenmiş olan sorunları ortaya çıkarabilir.
Medyayı güncellerken <audio>/<video> tarafından tetiklenen medyayla ilgili etkinlikleri kullanın
öğeler (timeupdate, pause ve waiting gibi).
progress, suspend ve
stalled (bunlar platforma bağlı olduğu için).
Web Alıcı sitenizin HTTPS sertifikalarını yapılandırırken
ara CA sertifikaları içerir. Bkz.
Qualsys SSL test page'i
doğrulayın: sitenizin güvenilir sertifika yolu bir sertifika yetkilisi içeriyorsa
"ekstra indirme" etiketli sertifika, Android tabanlı cihazlarda yüklenmeyebilir
platformlar.
Chromecast, Web Alıcısı sayfasını 720p grafik düzleminde görüntülerken
Android TV dahil diğer Cast platformları sayfayı 1080p'ye kadar görüntüleyebilir.
Web Alıcı sayfanızın farklı çözünürlüklerde sorunsuz şekilde ölçeklendirildiğinden emin olun.
Android Debug Bridge'i kullanma
Android TV platformu, pek çok tüketici elektroniği türünde kullanılıyor
cihazlar: televizyonlar, set üstü kutular, oyun konsolları vb.
Her biri farklı şekilde yapılandırılabilir.
Android TV sistem kaynaklarını cihazın kullanıcı arayüzünden kullanıyorsanız
Android Debug Bridge'i (ADB) kullanarak cihazınızın seri numarasını
yapabilir ve uygulamanızdaki hataları ayıklayabilirsiniz. Bkz. Android
Daha fazla bilgi için Debug Bridge
ekleyebilirsiniz.
Kablosuz ağ üzerinden ADB kullanma
Cihazınıza kablosuz bağlantıyla ADB üzerinden bağlanmak için:
Android TV cihazınızda geliştirici seçeneklerini şurada açıklandığı gibi etkinleştirin:
Geliştirme için hazırlanma.
Bilgisayarınızın Android cihazınızla aynı ağa bağlı olduğundan emin olun
TV'nize gidin.
Bir terminal açın ve aşağıdakileri girin:
adb connect Android TV device IP address:4321
Bilgisayarınızda bir terminal açın ve ADB komutlarını girin. Web sitemiz g.co/newsinitiative/labs
üzerinden
Android TV cihazının iletişim kurduğunu ve
aşağıdaki komutla bunu yapabilirsiniz:
adb logcat
USB kablosuyla ADB kullanma
Cihazınıza USB kablosuyla ADB üzerinden bağlanmak için:
USB kablosunun ana ucunu bilgisayarınıza bağlayın.
USB hata ayıklamasına izin verilsin mi? iletişim kutusunda, şuradan Her zaman izin ver'i seçin:
bu bilgisayarda ve Tamam'ı seçin.
Bilgisayarınızda bir terminal açın ve ADB komutlarını girin. Web sitemiz g.co/newsinitiative/labs
üzerinden
Android TV cihazının iletişim kurduğunu ve
aşağıdaki komutla bunu yapabilirsiniz:
adb logcat
TCP/IP üzerinden ADB kullanma
ADB, USB kablosu olmadan, TCP/IP üzerinden çalışır, ancak önce Android'i edinmeniz gerekir
TV cihazının IP adresi. Geliştirici sorunu olan cihazlar ADB bağlantı noktası bağlantılarını dinler
Bağlantı noktası başlatılmadan otomatik olarak bağlanabiliyor. Standart
perakende Android TV cihazları ADB bağlantılarını otomatik olarak dinlemez; şunun için:
için ilk olarak ADB'ye USB kablosuyla bağlanmalı ve
tıklayın.
Bilgisayarınızın Android ile aynı ağa bağlı olduğundan emin olun
TV'nize gidin.
Bilgisayarınızda, bir terminalde TCP/IP bağlantı noktasını şu şekilde başlatın:
aşağıdakileri girebilirsiniz:
adb tcpip 5555
USB kablosunu çıkarın ve aşağıdaki bilgileri terminale girin:
adb connect Android TV device IP address:5555
Cihazınız geliştiriciyle ilgili bir Android TV ise aşağıdakileri yapın:
Bilgisayarınızın Android cihazınızla aynı ağa bağlı olduğundan emin olun
TV'nize gidin.
Bir terminal açın ve aşağıdakileri girin:
adb connect Android TV device IP address:4321
Android TV'deki USB üzerinden hata ayıklamaya izin verilsin mi? iletişim kutusunda Her zaman
bu bilgisayardan izin ver seçeneğini tıklayın ve Tamam'ı seçin. Bağlantıyı doğrulayabilirsiniz
olduğunu ve Android TV cihazının
ağında aşağıdaki komutu kullanın:
[null,null,["Son güncelleme tarihi: 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 ```"]]