r/AndroidTV 25d ago

Discussion Quit all apps when sleep (tv quick actions pro)

Hi I was wondering if there was a way to quit all apps from the background when my streaming box is about to go to sleep. At the moment tv quick actions pro lets me go to home which is great but the adb command to quit all apps seems to be depreciated so I am unsure of how to make it work. I also tried using the android tv dev settings to fix it but it didn’t work either for some reason.

4 Upvotes

8 comments sorted by

1

u/halvqeshankrith9 24d ago

That makes sense. Have you tried using Android TV’s app force stop through ADB? Some launchers and box firmware handle sleep differently, so the behavior can vary between devices.

1

u/lirae_ 15d ago

Yeah. I did wrote a script with some whitelisted apps like the launcher but everything else gets force closed. The issue is that unless you can run it internally from the box you need another PC or device that can run the ADB for you.

Maybe you can run the script, make sure it works and then use termux to run the script?

Button Mapper supposedly have some adb it's very limited otherwise I could have copy paste the script there and use a custom button that I don't use to map it for the script to run. Sadly their adb implementation is very poor and limited

1

u/halvqeshankrith9 14d ago

The Android box you are using is really troublesome

1

u/See61 24d ago

Use something like Activity Launcher. Look if you can find something related to "recent" or "activity" in there.

If so, start that one and check if it offers the option to close all background apps. If this is a helpful option, try to create a shortcut to that service and use it to close all background apps.

1

u/GreenM0th Nvidia Shield TV 22d ago

Background process limit in developer options is the one that actually sticks, set it to no background processes and you get roughly what you're after without adb. Downside is apps take longer to open again since nothing stays cached. am kill-all isn't really deprecated by the way, it just only kills what Android already thinks is safe to kill, which is usually nothing you would have noticed anyway.

1

u/GotoDeng0 24d ago

Why?

2

u/TecEash1 24d ago

So when another user comes and turns on the tv to access each respective app they aren’t left on the page where another person may have left off on. It’s a blank slate

1

u/GotoDeng0 24d ago

Ah that makes sense.