開始使用 TV 應用程式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 提供豐富的使用者體驗,已對在大螢幕裝置上執行的應用程式最佳化,例如高畫質電視。TV 應用程式能創造新的機會,讓使用者輕鬆舒適地坐在沙發上。
TV 應用程式與手機和平板電腦採用的結構相同,因此您可以根據自己對 Android 應用程式的既有知識建立新的 TV 應用程式。或者,您也可以擴充現有應用程式,在 TV 裝置上執行。不過,電視的使用者互動模型與手機和平板電腦裝置有極大差異。為了讓您的應用程式在電視上獲得成功,建議您設計新的版面配置,讓使用者在距離 10 英尺 (10 英尺) 外的範圍內都能盡情使用,而且只要改用方向鍵和選取按鈕,就能舒適地瀏覽內容。
注意:電視應用程式可以在電視裝置上執行。如要進一步瞭解如何將 Android 應用程式中的影片和音訊串流至電視裝置,請參閱 Google Cast 開發人員說明文件。
主題
- 建立及執行 TV 應用程式
- 為電視應用程式建立新的 Android Studio 專案,或修改現有的應用程式專案,以便在 TV 裝置上執行。
- 處理 TV 硬體
- 檢查應用程式是否在電視硬體上執行、處理不支援的硬體功能,以及管理控制器裝置。
- 管理 TV 遙控器
- 透過管理電視控制器處理使用者輸入內容,
- 建構 TV UI
- 使用 Compose for TV 建構電視應用程式的新型宣告式 UI。
- 建立電視導覽功能
- 瞭解電視導覽的相關規定,以及如何實作與電視相容的導覽功能。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Get started with TV apps\n\nAndroid offers a rich user experience that's optimized for apps running on large screen devices,\nsuch as high-definition televisions. Apps on TV offer new opportunities to delight your users\nfrom the comfort of their couch.\n\n\nTV apps use the same structure as those for phones and tablets, which means you can\ncreate new TV apps based on what you already know about building apps for Android. Or you can extend your\nexisting apps to also run on TV devices. However, the user interaction model for TV is\nsubstantially different from phone and tablet devices. To make your app successful on TVs,\ndesign new layouts that viewers can enjoy from 10 feet away and comfortably navigate\nwith just a directional pad and a select button.\n\n\n**Note:** TV apps run locally on TV devices. To learn more about streaming video and\naudio from an Android app to a TV device, refer to the\n[developer documentation for Google Cast](https://developers.google.com/cast/).\n\nTopics\n------\n\n[Create and run a TV app](/training/tv/get-started/create)\n: Create a new Android Studio project for TV apps or modify your existing app project to run on\n TV devices.\n\n[Handle TV hardware](/training/tv/get-started/hardware)\n: Check if your app is running on TV hardware, handle unsupported hardware features, and manage\n controller devices.\n\n[Manage TV controllers](/training/tv/get-started/controllers)\n: Handle user input by managing TV controllers.\n\n[Build TV UIs](/training/tv/playback/compose)\n: Use Compose for TV to build modern, declarative UIs for TV apps.\n\n[Create TV navigation](/training/tv/get-started/navigation)\n: Understand the requirements for TV navigation and how to implement TV-compatible\n navigation."]]