Improve Android TV Remote docs (#32602)

This commit is contained in:
Artem Draft 2024-06-21 21:17:41 +03:00 committed by GitHub
parent 0546bb244e
commit 29c66e8ecb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,42 +32,57 @@ For a quick introduction on how to get started with Android TV Remote, check out
This {% term integration %} adds a `media_player` with basic playback and volume controls. The media player provides volume information and display name of current active app on the Android TV. Due to API limitations, the integration will not display the playback status. It is recommended to use this integration together with [Google Cast integration](/integrations/cast/). Two media players can be combined into one using the [Universal Media Player](/integrations/universal/) integration. See [Using with Google Cast](#using-with-google-cast) section for more details.
Using the `media_player.play_media` service, you can launch applications and switch channels. Only `url` and `channel` media types are supported.
Using the `media_player.play_media` {% term service %}, you can launch applications, switch channels, and start activities via `Deep Links`. Only `app`, `url` and `channel` media types are supported.
### Launching apps
If the Android TV device has the Google Play Store, you can directly launch any app by its application ID/package name.
If the Android TV device has the Google Play Store, you can directly launch any app by its application ID (package name).
The app doesn't need to exist in the Google Play Store.
If it exists, you can find the application ID in the URL of the app's Google Play Store listing.
For example, if the URL of an app page is `play.google.com/store/apps/details?id=com.example.app123`, the application ID is `com.example.app123`.
The application ID is also displayed in the media player card when you launch the application on the device.
Alternatively, if the device doesn't have the Google Play Store or if you want to open an app in a specific section, you can pass deep links supported by some applications.
Examples of application IDs for popular applications:
Examples of application IDs and deep links for popular applications:
| App | App ID |
| --- | --- |
| YouTube | `com.google.android.youtube.tv`
| Netflix | `com.netflix.ninja`
| Prime Video | `com.amazon.amazonvideo.livingroom`
| Disney+ | `com.disney.disneyplus`
| Plex | `com.plexapp.android`
| Kodi | `org.xbmc.kodi`
| Twitch | `tv.twitch.android.app`
| App | App ID | Deep link |
| --- | --- | --- |
| YouTube | `com.google.android.youtube.tv` | `https://www.youtube.com` or `vnd.youtube://` or `vnd.youtube.launch://`
| Netflix | `com.netflix.ninja` | `https://www.netflix.com/title` or `netflix://`
| Prime Video | `com.amazon.amazonvideo.livingroom` | `https://app.primevideo.com`
| Disney+ | `com.disney.disneyplus` | `https://www.disneyplus.com`
| Plex | `com.plexapp.android` | `plex://`
| Kodi | `org.xbmc.kodi` | N/A
| Twitch | `tv.twitch.android.app` | `twitch://home` `[home,stream,game,video,clip,search,browse,channel,user]`
Examples:
Example:
```yaml
# Launch the Netflix app
# Launch the YouTube app
service: media_player.play_media
data:
media_content_type: url
media_content_id: com.netflix.ninja
media_content_type: app
media_content_id: com.google.android.youtube.tv
target:
entity_id: media_player.living_room_tv
```
### Launching activities
Alternatively, if the device doesn't have the Google Play Store or if you want to open specific activity in the app, you can pass deep links supported by some applications.
Examples of deep links for popular applications:
| App | Deep link |
| --- | --- |
| YouTube | `https://www.youtube.com` or `vnd.youtube://` or `vnd.youtube.launch://`
| Netflix | `https://www.netflix.com/title` or `netflix://`
| Prime Video | `https://app.primevideo.com`
| Disney+ | `https://www.disneyplus.com`
| Plex | `plex://`
| Twitch | `twitch://home` `[home, stream, game, video, clip, search, browse, channel, user]`
Example:
```yaml
# Open a specific YouTube video:
service: media_player.play_media