Android TV Remote - App Links/Deep Linking - Guide

I’ll try this later today. Will spin up a linux VM on my pve and see what it does…
Thank you for all your responses.

Once I have done this, how would a adb_command look like ?

When I ran the command on a linux VM after connected to device, I’m getting the following

image

Not sure where to go from here ?

I have a lot off apps that doe not have the icon automatically added.
image

At this moment I have added some standard mdi icons, but I’m wondering if it is possible to create my own svg icons. and where to put them.
some examples I need:
FilmPlus:
icon: mdi:filmstrip
videoland:
icon: mdi:monitor
hbomax:
icon: mdi:betamax

Yes, use image instead of icon. There may be some formats that need something from HACs but png icons work with zero issues without installing anything, possible other formats. I think most format can simply be opened then do a “save as” and change the extension to png. Small icons like 25x25 or 50x50 works out good, preferably transparent, although I think HA does some scaling so non square images will get the sides cut off. I know I had to install something for FAS icons from HACs under the Lovelace category. Flaticon is a great site and has png and svg options for existing ones like Netflix

You have to place them in the www folder or subdirectory underneath

In the ui-lovelace.yaml.or yaml editor for non Lovelace you reference local for the path and any subdirectories if needed. Below is an example from my setup with the png files being underneath www. You.could possibly place them other places using the allowlist_external_dirs option in configuration.yaml but I never had much luck using that method.

EDIT: updated to show mini-media-plqyer card from HACs. For Android TV remote use app is instead of the below id you use this custom card. So Spotify would be com.spotify.tv.android . That or go all out and create them inside HA using the the Swiss Army Knife Custom Card if you got the time and skills for animation among other granular customization

Non custom card or dashboard code editor (I love the kikabit custom theme but it sucks for editing text)

      - entity: media_player.android_tv_192_168_0_62
        type: custom:mini-media-player
        artwork: cover
        source: all
        hide:
         volume: false
        shortcuts:
          columns: 4 # Max buttons per row
          buttons:
          - image: /local/icons8-netflix-desktop-app-64.png
            type: source
            id: Netflix
          # Change the source to Kodi
          - image: /local/icons8-kodi-200.png
            type: source
            id: Kodi
          - image: /local/icons8-youtube-squared-100.png
            type: source
            id: YouTube
          - image: /local/icons8-spotify-100.png
            type: source
            id: Spotify
       #     columns: 4 # Max buttons per row
     #       buttons:
          - image: /local/vnc-updated.png
            type: source
            id: com.realvnc.viewer.android
          - image: /local/plex.png
            type: source
            id: Plex
          - image: /local/icons8-remote-desktop-96.png
            type: source
            id: com.microsoft.rdc.androidx
          - image: /local/totalcomander.png
            type: source
            id: pl.solidexplorer2
          - image: /local/justplayer.png
            type: source
            id: com.brouken.player
          - image: /local/Google-Play-Transparent.png
            type: source
            id: com.android.vending
          - image: /local/Raspbery-pi.png
            type: source
            id: de.eidottermihi.raspicheck
          - image: /local/Speedtest.png
            type: source
            id: com.rma.netpulsetv

2 Likes

Thank you James, but sadly not working from me

The Android TV remote card is hard coded for the mdi and SVG icons which overrides anything you specify in yaml so you would have to manually change the JavaScript file in www/community/android-tv-card (see below for Netflix). Below is a line where I opened the js file and searched for Netflix.

action:“source”,source:“netflix://”},icon:“mdi:netflix”},paramount:{tap_action

It also appears some are svg files but you could easily mess something up so take a backup of that file if you want to try changing some icons. That way you can always get back to where you were at. There are zero results when searching for png though but SVG icons exist.

{action:“source”,source:“videoland-v2://”},icon:n.svg.videoland},vudu:{tap_action:{action:“source”,source:“vuduapp://”},icon:n.svg.vudu},youtube:{tap_action

If you create a new card and just add some entities it works like below. The Android TV remote card was written in a way to make it easy to setup with and uses specific mdi or SVG icons. Unless you know how to manually update the JavaScript file, which will get overwritten if there is an update, then it won’t work for that specific custom card. I primarily used png images but with some custom cards it’s not possible without manually updating the custom card. If the icons weren’t specified in the js file then nothing would have icons.

EDIT: after reading the docs you can change mdi icons (not sure about SVG in the custom actions portion but when using image like above it didn’t work on this particular custom card.

title: Sony Android TV
custom_actions:
  youtube:
    icon: mdi:mailbox-open-outline
rows:

As you can see the mailbox is now the YouTube icon. Also might be doable via json but I’m not a fan of json personally.

The code part

,disney:{tap_action:{action:"source",source:"https://www.disneyplus.com"},icon:n.svg.disney}

is linked with this part:

t.disney="M2.056 6.834C1.572 6.834 1 6.77 1 6.483c0-2.023 3.562-2.11 5.08-2.11c1.978 0 4.506.614 6.66 1.384c3.277 1.188 9.917 5.145 9.917 9.674c0 4.001-4.31 5.914-8.311 5.914a22 22 0 0 1-3.21-.33c-.066.243-.11.418-.264.924a4.3 4.3 0 0 1-.77.087l-.505-.043c-.33-.396-.44-1.033-.572-1.715c-2-1.165-3.298-2.155-3.891-2.836c-.506-.528-1.078-1.232-1.078-1.913c0-.351.22-.66.726-1.01c1.034-.77 2.352-1.188 4.507-1.563l.044-.9c.022-.22.242-2.573.748-3.013c.813.66.901 1.341.967 2.353c.022.44.044.901.11 1.385h.308c1.539 0 6.244.395 6.244 2.616c0 .528-.77 1.517-1.518 1.517a1.9 1.9 0 0 1-.966-.285c.329-.375.813-.704.945-.99c-.44-.528-2.814-1.143-4.551-1.143a4 4 0 0 0-.572.022l.022 4.815c.703.44 1.561.483 2.11.483c2.42 0 7.431-.417 7.431-4.331c0-3.87-4.946-6.86-8.64-8.266a21.4 21.4 0 0 0-7.937-1.496a7.2 7.2 0 0 0-1.803.198c-.373.088-.505.176-.505.264c0 .153.747.242.836.286a.22.22 0 0 1 .11.175a.26.26 0 0 1-.088.176c-.089 0-.286.022-.528.022M9.2 14.551c-2.176.177-4.595.397-4.595 1.166c0 .594 1.012 1.32 1.627 1.781a7.05 7.05 0 0 0 2.77 1.319zm11.155-9.85c-.02.428-.042.942-.042 1.723c0 .3 0 .642.01 1.027c-.042.193-.32.214-.46.278a1.2 1.2 0 0 1-.256-.192V4.83c0-.29.01-.588.01-1.038c0-.225 0-.482-.01-.792c0-.192.032-.374.15-.802a.34.34 0 0 1 .3-.224c.245.064.491.17.577.374c-.257.76-.235 1.594-.279 2.353m-.384-.085c.428.021.941.042 1.722.042c.3 0 .643 0 1.027-.01c.193.041.215.32.279.459q-.078.141-.193.257H20.1c-.289 0-.589-.01-1.037-.01c-.225 0-.482 0-.792.01c-.193.002-.375-.03-.803-.149a.35.35 0 0 1-.225-.299c.064-.246.172-.492.374-.578c.76.257 1.595.235 2.355.278z"

I understand that this is the SVG code,
Do you have any Idea how to create this? I found some svg > Javascript converters online, those generate something that looks similar but doesn’t work

APP Link for TiviMate:
With the suggested change of using ADB to deeplink to an app. Does anyone know if it is now possible to deeplink to “TiviMate”? I know it has been mentioned in this thread last year that the developer did not support deep linking, however I am curious to see if anyone knows of a workaround?
This is what ADB currently gives me:

With my STB I can access jellyfin and VLC by below given links. YMMV.

JellyFin: org.jellyfin.androidtv
VLC: org.videolan.vlc

Guys, I was able to get Tivimate to launch on my Nvidia Shield using the following in the developer tools:

service: remote.turn_on
target:
device_id: 730a2d01eafcaf90f5e08612f2d17eaf
data:
activity: ar.tvplayer.tv

So it appears using the package/app name “ar.tvplayer.tv” which is what is displayed in the Apps sections

that might be my issue. I’m not sure how to get the tv apk thoughh

No, I wish I did. Don’t know much about SVG. Seems like a headache to learn or do based of brief research.

Go to settings, then app. The app is will be displayed as Google seems to have no naming conventions rules. Usually com.appx but can be many things. Then use the script below if using ADB. If using Android remote I believe it will work, In visual editor just choose the options and paste in the source.

service: media_player.select_source
metadata: {}
data:
  source: com.example.hdmirxdemo
target:
  entity_id: media_player.android_tv_192_168_0_62

just want to update, I found the sportsnet android tv app…there is no fields that match the ones required for deeplinking as of yet. 5.1.15 was the version

Hi,

Still trying to get F1TV started on ChromeCast TV HD.
But with code below, it only opens the app in the play store with the options to open or delete.

action: media_player.play_media
target:
entity_id: media_player.chromecast_hd_androidtv
data:
media_content_id: com.formulaone.production
media_content_type: app
metadata: {}

It seems this does not work similarly in Philips Android TV. For example, market://launch?id=com.yle.webtv goes to associated Google Play Store page. Same actually happens when just max is specified in my Philips. Both apps are installed in my TV.

Yet another deeplink. In my Philips the default TV action does not do anything. Instead, I had to use org.droidtv.playtv. That switches to TV.

Finally found it - it’s nflctv://

Were you able to launch TiViMate app?

Did you double quote it in the yaml?