Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Layar utama Android TV menampilkan konten yang direkomendasikan menggunakan saluran dan
program kami. Saluran ditampilkan sebagai baris tersendiri di layar beranda, dengan
kartu yang menampilkan semua program yang tersedia untuk saluran tersebut.
Aplikasi Anda harus memiliki setidaknya satu saluran. Channel pertama Anda
dibuat oleh aplikasi Anda menjadi saluran default,
dan Android TV menampilkan saluran tersebut
secara otomatis di layar utama. Aplikasi Anda
dapat menawarkan saluran lain, tetapi pengguna harus memilih dan menyetujui saluran tersebut
sebelum mereka
ditambahkan ke layar utama.
Jika aplikasi Anda menampilkan acara TV, film, atau konten video lainnya, sebaiknya
Anda mendukung pratinjau video dan
terintegrasi dengan saluran Tonton Berikutnya.
Saluran Watch Next dikendalikan oleh sistem Android. Aplikasi Anda dapat menambahkan
program terkait pengguna ke saluran ini, seperti program yang ditandai pengguna sebagai
menarik, berhenti menonton di tengah jalan, atau yang terkait dengan konten
yang ditonton pengguna (seperti episode berikutnya dalam serial atau season berikutnya
acara TV).
Memastikan kompatibilitas
Layar utama menampilkan rekomendasi dua cara berbeda bergantung pada
versi Android:
Di Android 8.0 (API level 26) dan yang lebih baru, aplikasi dapat menampilkan rekomendasi dalam satu atau
saluran lainnya yang
muncul pada baris terpisah. Satu saluran (saluran default)
selalu muncul. Pengguna dapat menemukan dan menambahkan saluran lain ke rumah mereka
layar. Pelajari cara membuat saluran rekomendasi
di layar beranda.
Sebelum Android 8.0, Android TV menampilkan semua rekomendasi dalam satu
baris rekomendasi yang selalu muncul di layar. Pelajari cara membuat
baris rekomendasi di beranda
layar.
Agar dapat menampilkan rekomendasi di semua versi Android TV, aplikasi Anda
harus menerapkan kedua API rekomendasi. Menguji level API sistem saat ini dan
menggunakan API yang sesuai untuk membuat baris atau saluran rekomendasi.
Kotlin
if(android.os.Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){// Use the home screen recommendation channels API}else{// Use the recommendations row API}
Java
if(android.os.Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){// Use the home screen recommendation channels API}else{// Use the recommendations row API}
Jika aplikasi Anda dikompilasi menggunakan API level 25 atau yang lebih lama, aplikasi masih dapat berjalan di
Android TV di level 26. Perilaku rekomendasi lama kompatibel dengan versi yang lebih baru,
tetapi dibatasi:
Baris rekomendasi secara otomatis dikonversi dan muncul sebagai
pada layar beranda.
Program di saluran yang dikonversi merespons pembaruan dari
layanan rekomendasi,
tetapi pengguna tidak dapat menggunakan UI TV untuk memanipulasi program di saluran
(tambahkan/hapus program, salin program ke saluran Tonton Berikutnya).
Jika Anda mengupdate aplikasi ke level API 26, saluran yang dikonversi
masih muncul di TV yang
menjalankan API 26. TV akan menghapus saluran yang dikonversi dari
layar saat pertama kali aplikasi Anda menampilkan saluran yang dibuat dengan API baru.
Hal ini langsung terjadi jika aplikasi membuat
channel default,
atau nanti ketika pengguna memilih dan menambahkan saluran lain yang dibuat oleh aplikasi Anda.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Recommend content on the home screen\n\nThe Android TV *home screen* displays recommended content using *channels* and\n*programs*. Channels are displayed as individual rows on the home screen, with\ncards that display all of the available programs for that channel.\n\nYour app should have at least one channel. The first channel your\napp creates becomes its [default channel](/training/tv/discovery/recommendations-channel#default-channel),\nand Android TV displays that channel automatically on the home screen. Your app\ncan offer other channels, but the user must select and approve those channels\nbefore they are added to the home screen.\n\nIf your app features TV shows, movies, or other video content, we recommend that\nyou support [video previews](/training/tv/discovery/preview-videos) and\nintegrate with the [Watch Next channel](/training/tv/discovery/recommendations-channel#watch-next).\nThe Watch Next channel is controlled by the Android system. Your app can add\nuser-related programs to this channel, such as programs that the user marked as\ninteresting, stopped watching in the middle, or that are related to the content\nthe user is watching (like the next episode in a series or next season of a\nshow).\n\nEnsure compatibility\n--------------------\n\nThe home screen displays recommendations two different ways depending on the\nversion of Android:\n\n- In Android 8.0 (API level 26) and later, apps can show recommendations in one or more channels that appear on separate rows. One channel (the default channel) always appears. The user can discover and add the other channels to their home screen. Learn how to create [recommendation channels](/training/tv/discovery/recommendations-channel) on the home screen.\n- Before Android 8.0, Android TV shows all recommendations in a single recommendations row that always appears on the screen. Learn how to create the [recommendation row](/training/tv/discovery/recommendations-row) on the home screen.\n\nTo be able to show recommendations on all versions of Android TV, your app\nshould implement both recommendation APIs. Test the current system API level and\nuse the appropriate API to build the recommendation row or channels. \n\n### Kotlin\n\n```kotlin\nif (android.os.Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.O) {\n // Use the home screen recommendation channels API\n} else {\n // Use the recommendations row API\n}\n```\n\n### Java\n\n```java\nif (android.os.Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.O) {\n // Use the home screen recommendation channels API\n} else {\n // Use the recommendations row API\n}\n```\n\nIf your app was compiled using API level 25 or earlier, it can still run on\nAndroid TV in level 26. The old recommendations behavior is forward-compatible,\nbut constrained:\n\n- The recommendations row is automatically converted and appears as a new channel on the home screen.\n- The programs on the converted channel respond to updates from your [recommendation service](/training/tv/discovery/recommendations-row#service), but the user cannot use the TV's UI to manipulate the programs on the channel (add/remove programs, copy programs to the Watch Next channel).\n- If you update the app to API level 26, the converted channel still appears on TVs running API 26. The TV removes the converted channel from the screen the first time your app displays a channel created with the new API. This happens immediately if the app creates a [default channel](/training/tv/discovery/recommendations-channel#the_default_channel), or later when the user selects and adds any other channel created by your app.\n\n| **Note:** This forward-compatible behavior is temporary, it will be removed sometime in the future. To ensure compatibility, the best practice is to implement both APIs, as described above."]]