Update: You can launch any app by its package name. e.g. you can launch Kodi with market://launch?id=org.xbmc.kodi
Once Android TV Remote: Support launching any app by package name by tronikos · Pull Request #116906 · home-assistant/core · GitHub and Update Android TV Remote documentation that you can launch any app by package name by tronikos · Pull Request #32605 · home-assistant/home-assistant.io · GitHub are merged you won’t need to add market://launch?id=
Below is the old guide which is only needed if you want to launch an app in a specific section.
This is a guide for how to find out URLs to pass to the Android TV Remote - Home Assistant integration for opening apps. It’s also an attempt to collect URLs for the most common apps.
How to find out URLs
It would be good to start by reading and understanding Deep Linking on Android Developers. If an app allows deep linking, in its manifest it will have intent-filter with data like the following examples:
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
<!-- note that the leading "/" is required for pathPrefix-->
<!-- Accepts URIs that begin with "example://gizmos” -->
<data android:scheme="example"
android:host="gizmos" />
So this example accepts http://www.example.com/gizmos
and example://gizmos
How to get AndroidManifest.xml with ADB access
If you can connect to the device with ADB, you can use the following command:
adb shell cmd package dump PACKAGE
Where PACKAGE is the name inside the “current_activity” attribute of the remote entity. Or alternatively, you might be able to find it in adb shell cmd package list packages
Example: adb shell cmd package dump com.google.android.youtube.tv
How to get AndroidManifest.xml without ADB access
First you need to find an APK for the app you are interested. Just search on your favorite search engine: e.g. Plex apk
.
Once you have the APK you can use any of the answers on android - How to view AndroidManifest.xml from APK file? - Stack Overflow for viewing the AndroidManifest.xml
Easiest option is likely to upload and decompile the APK on APK decompiler - decompile Android .apk ✓ ONLINE ✓
Once it finishes decompiling, save the zip, open it and locate resources/AndroidManifest.xml
. Open it in a text viewer and search for <data
For example you will find:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="plex"/>
</intent-filter>
This means that you can open Plex with the following service call:
service: remote.turn_on
data:
activity: plex://
target:
entity_id: remote.living_room_tv
Some apps might have a string reference instead. For example the NBA: Live Games & Scores app has:
<intent-filter android:label="@string/deeplink_label">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="@string/deeplink_schema" android:host="*"/>
</intent-filter>
Searching for deeplink_schema
in all decompiled files you should find a reference in string.xml
:
<string name="deeplink_schema">gametime</string>
So to launch NBA: Live Games & Scores you need gametime://
Collection of deep links for apps
(Anyone can edit this guide so please click on edit and add your missing favorite app. Keep the list sorted by app name.)
App | URL |
---|---|
10Play | tenplay:// |
1und1.tv | 1und1tv://1und1.tv |
7Plus | seven:// |
ABC iview | https://iview.abc.net.au |
Apple TV | https://tv.apple.com |
ARD | https://www.ardmediathek.de |
Arte | arte://display |
Auvio | auvio:// |
Bally Sports | ballysports:// |
BBC iPlayer | bbc://iplayer/browse |
Bell Télé Fibe | fonsetv:// or fonsetv://home |
CloudStream | cloudstreamapp:// |
Crunchyroll | crunchyroll:// |
Disney+ | https://www.disneyplus.com |
DisneyNow | disneychannel://home [home, allshows, allgames, allmovies, live, show, collection, game] |
Dropout.tv | vhxdropout:// |
DRTV | tvrecommendation://app |
Emby | embyatv://tv.emby.embyatv/startapp |
Fox Sports | foxsports://live [series,movie,watch,category,movies,special,live,channel,ppv-purchase,search] |
Google Play Store | https://play.google.com/store/ |
GoPlay | https://www.goplay.be |
HBO Max | https://play.hbomax.com or hbomax://deeplink |
ITVX | itvhomescreenchannels://com.itv.tenft.itvhub/startapp |
Meo | ottapp:// |
MLB TV | mlbatbat:// |
My5 | my5:// or https://www.channel5.com/ or https://www.my5.tv/ |
NBA: Live Games & Scores | gametime:// |
Netflix | https://www.netflix.com/title or netflix:// |
NLZiet | https://nlzietshare.page.link/ or nlziet:// |
Paramount Plus | https://www.paramountplus.com/ |
PBSKids | https://pbskids.org/video or http://pbskids.org/video |
Plex | plex:// |
PlutoTV | https://pluto.tv/en/live-tv |
Prime Video | https://app.primevideo.com |
Private Internet Access | piavpn:// |
Rakuten Viki | viki://home |
SkyShowtime | https://www.skyshowtime.com/deeplink |
SmartTubeNext | https://www.youtube.com on CCwGTV: vnd.youtube.launch://www.youtube.com |
Spotify | spotify:// |
Streamz | streamz://www.streamz.be/streamz [series,mijn-lijst] |
SurfShark | https://surfshark.com/locations-ul |
TBS | watchtbs:// |
Tubi | https://tubitv.com/ |
TV4 Play | tv4play:// |
Twitch | twitch://home [home,stream,game,video,clip,search,browse,channel,user] |
ViaPlay | viaplay://com.viaplay.android/film/ or viaplay://deeplink/film |
VRT Max | vrtnu://vrtnu |
VTM GO | vtmgo:// |
Waipu TV | waipu://tv or waipu://epg or waipu://recordings |
YouTube | https://www.youtube.com or vnd.youtube:// or vnd.youtube.launch:// |
YouTube TV | https://tv.youtube.com |
Zattoo | zattoo://zattoo.com |
ZDF | https://www.zdf.de/filme |
Notes
- If there are multiple apps, e.g. YouTube and SmartTubeNext, that are registered for the same URL, you should get a prompt to select which app to open it with, asking you “just once” or “always”. You should select always to avoid this prompt the next time.
- Not all apps support deep linking.
- If an app doesn’t support deep linking, you can use the “remote: send command” service call, and send
PROG_RED
orPROG_GREEN
etc, and then remap those buttons using the app “button mapper” to launch your desired app. This has the added benefit, if you have a physical remote with those buttons on it, of also remapping the buttons there.