เริ่มต้นใช้งานแอปสำหรับทีวี
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Android มอบประสบการณ์การใช้งานที่สมบูรณ์แบบซึ่งเพิ่มประสิทธิภาพสำหรับแอปที่ทำงานบนอุปกรณ์หน้าจอขนาดใหญ่ เช่น ทีวีความละเอียดสูง แอปบนทีวีเปิดโอกาสใหม่ๆ ในการสร้างความพึงพอใจให้แก่ผู้ใช้จากโซฟาแสนสบาย
แอปทีวีใช้โครงสร้างเดียวกับแอปสำหรับโทรศัพท์และแท็บเล็ต ซึ่งหมายความว่าคุณจะสร้างแอปทีวีใหม่ได้โดยใช้ความรู้ที่คุณมีอยู่แล้วเกี่ยวกับการสร้างแอปสำหรับ Android หรือจะขยายการให้บริการแอปที่มีอยู่ให้ทำงานบนอุปกรณ์ทีวีได้ด้วยก็ได้ อย่างไรก็ตาม รูปแบบการโต้ตอบของผู้ใช้สำหรับทีวีจะแตกต่างจากอุปกรณ์โทรศัพท์และแท็บเล็ตอย่างมาก หากต้องการให้แอปประสบความสำเร็จบนทีวี ให้ออกแบบเลย์เอาต์ใหม่ที่ผู้ชมจะเพลิดเพลินได้จากระยะ 10 ฟุตและไปยังส่วนต่างๆ ได้อย่างสะดวกสบายด้วยปุ่มบังคับทิศทางและปุ่มเลือกเท่านั้น
หมายเหตุ: แอป TV จะทำงานในอุปกรณ์ทีวี ดูข้อมูลเพิ่มเติมเกี่ยวกับการสตรีมวิดีโอและเสียงจากแอป Android ไปยังอุปกรณ์ทีวีได้ที่เอกสารประกอบสำหรับนักพัฒนาแอป Google Cast
หัวข้อ
- สร้างและเรียกใช้แอปทีวี
- สร้างโปรเจ็กต์ Android Studio ใหม่สำหรับแอปทีวี หรือแก้ไขโปรเจ็กต์แอปที่มีอยู่ให้ทำงานบนอุปกรณ์ทีวี
- จัดการฮาร์ดแวร์ทีวี
- ตรวจสอบว่าแอปทำงานบนฮาร์ดแวร์ทีวีหรือไม่ จัดการฟีเจอร์ฮาร์ดแวร์ที่ระบบไม่รองรับ และจัดการอุปกรณ์คอนโทรลเลอร์
- จัดการตัวควบคุมทีวี
- จัดการอินพุตของผู้ใช้โดยการจัดการตัวควบคุมทีวี
- สร้าง UI ของทีวี
- ใช้ Compose สำหรับ TV เพื่อสร้าง UI แบบประกาศที่ทันสมัยสำหรับแอปทีวี
- สร้างการนำทางสำหรับทีวี
- ทำความเข้าใจข้อกำหนดในการไปยังส่วนต่างๆ ของทีวีและวิธีใช้การไปยังส่วนต่างๆ ที่ใช้งานร่วมกับทีวีได้
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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."]]