NVIDIA Shield - “Close all background apps” action #159
-
This isn’t necessarily a feature request as it is an information request. I’d like to be able to run a script on my NVIDIA Shield Pro which closes all background apps. I’ve noticed that I’m able to Customise the Menu Button to do this under the Shield options by selecting “Close all background apps”. My hope was that there was a way to call this action from home assistant in a similar way to how your project allows me to call the “find my remote” action. Is someone able to point me in the right direction on this? Just as background, my reason for this is that one of the live sports apps I use never resets itself to the Home Screen so I’m forever opening it up to a blank “this program is no longer playing screen” and get back to the Home Screen can be quite cumbersome as it recalls the Home Screen from the last time I used the app… typically with last weeks football games! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @michael7oliver I've been digging through some of my old research, trying new things, looking up some things, etc. and I think that the best option for your situation might be to use a script that closes just the offending sports app. I've tried some commands that will close everything running on my NVIDIA Shield Pro, but they aren't always careful about closing only the things that should be closed. Sometimes they close things that really should stay open which can lead to undesirable results. I also tried to work out a solution to simulate a double tap or a long press on the remote button, but due to some interesting android certification that needed to be done for these units... long story short, that avenue was a dead end too. My BEST suggestion right now is this:
With this successful step accomplished, you now know what you need to write a home assistant script, if that's what you are interested in doing. In my example, I created a script called stop_youtube: stop_youtube:
alias: Stop YouTube
sequence:
- service: androidtv.adb_command
data:
command: adb shell am force-stop com.google.android.youtube.tv
target:
entity_id: media_player.android_tv_192_168_107_209
mode: single
icon: mdi:youtube Is that helpful? -Doug |
Beta Was this translation helpful? Give feedback.
Hello @michael7oliver
I've been digging through some of my old research, trying new things, looking up some things, etc. and I think that the best option for your situation might be to use a script that closes just the offending sports app.
I've tried some commands that will close everything running on my NVIDIA Shield Pro, but they aren't always careful about closing only the things that should be closed. Sometimes they close things that really should stay open which can lead to undesirable results.
I also tried to work out a solution to simulate a double tap or a long press on the remote button, but due to some interesting android certification that needed to be done for these units... …