I'm looking for a way to automatically turn off my Android mobile hotspot after there has been no data activity for a set amount of time. I'd also like more control over individual connected devices, such as limiting or blocking their network access. The options I've found only shut the hotspot off after a data limit is reached, while Android's built-in setting turns it off only when no devices are connected. Since connected devices often remain technically connected even when they aren't being used, those solutions don't quite work for me.
3 Answers
A practical workaround is to use Tasker, Automate, or MacroDroid together with Shizuku. You can monitor whether devices are connected or whether tethering activity is occurring, start a timer after the last device becomes inactive, and then toggle the hotspot off automatically.
Recent Android versions restrict third-party apps from controlling hotspot functions directly. For a fully custom solution, you’d typically need root access or a custom ROM with additional tethering controls.
You may not need root. Tasker, Automate, or MacroDroid can work with Shizuku to access some of those controls, although setup takes a bit of effort.
There doesn’t appear to be a polished app that provides all of these features out of the box. With Shizuku, Android’s Developer Options, and ADB permissions enabled, an automation app can detect tethering connections and control the hotspot without root. You’ll likely need to create the inactivity timer and device rules yourself.

That isn’t quite the ready-made app I was hoping for, but since there doesn’t seem to be a simple option, I’ll try building it with Automate. I’d rather avoid paying for a single feature, and I’ll work through the setup if necessary.