Update Android TV Remote documentation that you can launch any app by its application ID/package name (#32605)

This commit is contained in:
tronikos 2024-05-15 12:32:21 -07:00 committed by GitHub
parent 2c895a19e5
commit b4b222160b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,21 +32,29 @@ 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 via `Deep Links` and switch channels. Only `url` and `channel` media types are supported.
Using the `media_player.play_media` service, you can launch applications and switch channels. Only `url` and `channel` media types are supported.
### Launching apps
You can pass any URL to the device. Using `Deep Links`, you can launch some applications.
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.
Examples of some `Deep Links` for popular applications:
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.
| App | URL |
| --- | --- |
| 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://`
Examples of application IDs and deep links for popular applications:
| 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:
@ -55,7 +63,7 @@ Examples:
service: media_player.play_media
data:
media_content_type: url
media_content_id: https://www.netflix.com/title
media_content_id: com.netflix.ninja
target:
entity_id: media_player.living_room_tv
```
@ -130,6 +138,7 @@ media_player:
The remote allows you to send key commands to your Android TV device with the `remote.send_command` service.
The entity has the `current_activity` attribute that shows the current foreground app on the Android TV.
You can pass the application ID shown in this `current_activity` as `activity` in the `remote.turn_on` service to launch that app.
{% details "List of the most common commands" %}
@ -213,7 +222,7 @@ Other:
{% enddetails %}
If `activity` is specified in `remote.turn_on` it will open the specified URL in the associated app. See [Launching apps section](#launching-apps).
If `activity` is specified in `remote.turn_on` it will open the specified URL or the application with the given package name. See [Launching apps section](#launching-apps).
Examples of service calls:
@ -491,7 +500,7 @@ cards:
action: call-service
service: remote.turn_on
data:
activity: https://www.netflix.com/title
activity: com.netflix.ninja
target:
entity_id: remote.living_room_tv
hold_action:
@ -503,7 +512,7 @@ cards:
action: call-service
service: remote.turn_on
data:
activity: https://app.primevideo.com
activity: com.amazon.amazonvideo.livingroom
target:
entity_id: remote.living_room_tv
hold_action:
@ -515,7 +524,7 @@ cards:
action: call-service
service: remote.turn_on
data:
activity: https://www.disneyplus.com
activity: com.disney.disneyplus
target:
entity_id: remote.living_room_tv
hold_action: