Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
La schermata Home di Android TV mostra i contenuti consigliati tramite i canali e
programmi. I canali vengono visualizzati come singole righe nella schermata Home, con
schede che mostrano tutti i programmi disponibili per quel canale.
La tua app deve avere almeno un canale. Il primo canale
gli elementi creati dall'app diventano il suo canale predefinito,
e Android TV mostra il canale
automaticamente sulla schermata Home. La tua app
Può offrire altri canali, ma l'utente deve selezionarli e approvarli
prima che vengano aggiunti alla schermata Home.
Se la tua app include programmi TV, film o altri contenuti video, ti consigliamo di:
supporti le anteprime video e
possono effettuare l'integrazione con il canale Cosa guardare.
Il canale Cosa guardare è controllato dal sistema Android. La tua app può aggiungere
programmi correlati agli utenti per questo canale, ad esempio programmi contrassegnati dall'utente come
interessanti, che hanno interrotto la visione o che sono correlati ai contenuti.
l'utente sta guardando (ad esempio il prossimo episodio di una serie o la prossima stagione di
).
Garantire la compatibilità
La schermata Home mostra i consigli in due modi diversi a seconda del
Versione di Android:
In Android 8.0 (livello API 26) e versioni successive, le app possono mostrare consigli in uno o più
più canali che appaiono su righe separate. Un canale (il canale predefinito)
appare sempre. L'utente può scoprire e aggiungere gli altri canali alla propria casa
schermo. Scopri come creare canali consigliati.
sulla schermata Home.
Prima di Android 8.0, Android TV mostrava tutti i consigli in un unico posto
dei consigli che appare sempre sullo schermo. Scopri come creare
riga dei consigli nella home page
schermo.
Per poter mostrare consigli su tutte le versioni di Android TV, la tua app
deve implementare entrambe le API di suggerimento. Testa l'attuale livello API di sistema e
Utilizzare l'API appropriata per creare la riga o i canali dei suggerimenti.
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}
Se la tua app è stata compilata utilizzando il livello API 25 o versioni precedenti, può comunque essere eseguita
Android TV nel livello 26. Il vecchio comportamento dei suggerimenti è compatibile con il forwarding,
ma limitato:
La riga dei consigli viene convertita automaticamente e appare come una nuova
canale sulla schermata Home.
I programmi sul canale convertito rispondono agli aggiornamenti dei tuoi
servizio di suggerimenti,
ma l'utente non può utilizzare l'interfaccia utente della TV per manipolare i programmi sul canale
(aggiungi/rimuovi programmi, copia i programmi nel canale Cosa guardare).
Se aggiorni l'app al livello API 26, il canale convertito
vengono comunque visualizzati sulle TV che eseguono l'API 26. La TV rimuove il canale convertito da
la prima volta che l'app visualizza un canale creato con la nuova API.
Ciò avviene immediatamente se l'app crea un
canale predefinito,
o in un secondo momento, quando l'utente selezionerà e aggiunge qualsiasi altro canale creato dalla tua app.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[null,null,["Ultimo aggiornamento 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."]]