Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
A tela inicial do Android TV mostra o conteúdo recomendado usando canais e
programas. Os canais são exibidos como linhas individuais na tela inicial, com
cards que exibem todos os programas disponíveis para o canal.
Seu app precisa ter pelo menos um canal. O primeiro canal que seu
que o app cria se torna o canal padrão dele,
e o Android TV vai mostrar esse canal automaticamente na tela inicial. Seu app
podem oferecer outros canais, mas o usuário precisa selecionar e aprovar esses canais
antes de serem adicionadas à tela inicial.
Se o app apresentar programas de TV, filmes ou outro conteúdo de vídeo, recomendamos que você faça o seguinte:
você oferece suporte para prévias de vídeos e
fazer a integração com o canal "Assistir a seguir".
O canal "Assistir a seguir" é controlado pelo sistema Android. Seu app pode adicionar
programas relacionados ao usuário para este canal, como programas que o usuário marcou como
interessantes, parou de assistir no meio ou que estão relacionados ao conteúdo
que o usuário está assistindo (como o próximo episódio de uma série ou a próxima temporada de um
programa).
Garantir compatibilidade
A tela inicial exibe recomendações de duas maneiras diferentes, dependendo
do Android:
No Android 8.0 (nível 26 da API) e versões mais recentes, os apps podem mostrar recomendações de uma ou
mais canais que aparecem em linhas separadas. Um canal (o canal padrão)
sempre aparece. O usuário pode descobrir e adicionar outros canais à página inicial
tela. Saiba como criar canais de recomendação
na tela inicial.
Antes do Android 8.0, o Android TV mostra todas as recomendações em uma única
linha de recomendações que sempre aparece na tela. Saiba como criar o
linha de recomendações na página inicial
tela.
Para poder mostrar recomendações em todas as versões do Android TV, seu app
deve implementar as duas APIs de recomendação. Teste o nível atual da API do sistema e
usar a API apropriada para criar a linha ou os canais de recomendação.
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 o seu app foi compilado usando uma API de nível 25 ou anterior, ele ainda pode ser executado em
Android TV no nível 26. O comportamento antigo
é compatível com versões futuras,
mas restrito:
A linha de recomendações é convertida automaticamente e aparece como uma nova
na tela inicial.
Os programas no canal convertido respondem a atualizações de sua
serviço de recomendação,
mas o usuário não pode usar a interface da TV para manipular os programas no canal
(adicione/remova programas, copie programas para o canal "Assistir a seguir").
Se você atualizar o app para o nível 26 da API, o canal convertido
ainda aparece em TVs com a API 26. A TV remove o canal convertido
na tela na primeira vez que seu aplicativo exibir um canal criado com a nova API.
Isso acontece imediatamente se o app criar uma
default channel,
ou depois, quando o usuário selecionar e adicionar qualquer outro canal criado pelo seu app.
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[null,null,["Última atualização 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."]]