Cómo recomendar contenido en la pantalla principal
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
La pantalla principal de Android TV muestra contenido recomendado mediante canales y
programas. Los canales se muestran como filas individuales en la pantalla de inicio, con
tarjetas que muestran todos los programas disponibles para ese canal.
Tu app debe tener al menos un canal. El primer canal que
que crea la app se convierte en su canal predeterminado,
Android TV lo mostrará automáticamente en la pantalla principal. Tu app
Puede ofrecer otros canales, pero el usuario debe seleccionarlos y aprobarlos
antes de que se agreguen a la pantalla principal.
Si la app incluye programas de TV, películas u otro contenido de video, te recomendamos lo siguiente:
Se admiten las vistas previas de video y
integrarlos en el canal Ver a continuación.
El sistema Android controla este canal. Tu app puede agregar
programas relacionados con el usuario a este canal, como los programas que el usuario marcó como
interesantes, dejaron de mirar por la mitad o están relacionadas con el contenido
que el usuario está mirando (como el siguiente episodio de una serie o la próxima temporada de un
programa).
Cómo garantizar compatibilidad
La pantalla de inicio muestra recomendaciones de dos maneras diferentes según el
versión de Android:
En Android 8.0 (nivel de API 26) y versiones posteriores, las apps pueden mostrar recomendaciones en un
más canales que aparecen en filas separadas. Un canal (el canal predeterminado)
siempre aparece. El usuario puede descubrir y agregar los otros canales a su casa.
en la pantalla. Obtén más información sobre cómo crear canales de recomendaciones
en la pantalla de inicio.
En versiones anteriores a Android 8.0, Android TV muestra todas las recomendaciones en un solo lugar.
recomendaciones que siempre aparece en la pantalla. Aprende a crear
fila de recomendaciones en la página principal
en la pantalla.
Para poder mostrar recomendaciones en todas las versiones de Android TV, tu app
debería implementar ambas APIs de Recommendation. Prueba el nivel de API actual del sistema y
usar la API adecuada para crear las filas de recomendaciones o los canales.
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}
Si tu app se compiló con un nivel de API 25 o anterior, aún puede ejecutarse en
Android TV en el nivel 26. El comportamiento anterior de las recomendaciones
es compatible con versiones futuras
pero con limitaciones:
La fila de recomendaciones se convierte automáticamente y aparece como un nuevo
en la pantalla principal.
Los programas del canal convertido responden a las actualizaciones de tu
servicio de recomendaciones
pero el usuario no puede utilizar la interfaz de usuario de la TV para manipular los programas del canal
(agregar o quitar programas, copiar programas al canal Ver a continuación)
Si actualizas la app al nivel de API 26, el canal convertido
sigue apareciendo en TVs que ejecutan el nivel de API 26. La TV quita el canal convertido de
la pantalla la primera vez que tu app muestre un canal creado con la nueva API.
Esto sucede inmediatamente si la app crea
canal predeterminado,
o más adelante, cuando el usuario seleccione y agregue cualquier otro canal creado por tu aplicación.
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[null,null,["Última actualización: 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."]]